This documentation differs from the official API.
Jadeite adds
extra features to the API including:
variable font sizes,
constructions examples,
placeholders for classes and methods, and auto-generated “See Also” links.
Additionally it
is missing some items found in standard Javadoc documentation, including:
generics type information,
“Deprecated” tags and comments,
“See Also” links,
along with other minor differences.
Please send any questions or feedback to
bam@cs.cmu.edu.
javax.swing.plaf.synth
class SynthStyleFactory
public abstract class SynthStyleFactory
extends Object
Factory used for obtaining SynthStyle
s. Each of the
Synth ComponentUI
s will call into the current
SynthStyleFactory
to obtain a SynthStyle
for each of the distinct regions they have.
The following example creates a custom SynthStyleFactory
that returns a different style based on the Region
:
class MyStyleFactory extends SynthStyleFactory {
public SynthStyle getStyle(JComponent c, Region id) {
if (id == Region.BUTTON) {
return buttonStyle;
}
else if (id == Region.TREE) {
return treeStyle;
}
return defaultStyle;
}
}
SynthLookAndFeel laf = new SynthLookAndFeel();
UIManager.setLookAndFeel(laf);
SynthLookAndFeel.setStyleFactory(new MyStyleFactory());
Constructor Summary |
Creates a SynthStyleFactory .
|
Method Summary |
abstract SynthStyle |
Returns the style for the specified Component.
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SynthStyleFactory
public SynthStyleFactory()
-
Creates a
SynthStyleFactory
.
getStyle
public abstract SynthStyle getStyle(JComponent c,
Region id)
-
Returns the style for the specified Component.
- Parameters:
c
- Component asking for
id
- Region identifier
- Returns:
- SynthStyle for region.
This documentation differs from the official API.
Jadeite adds
extra features to the API including:
variable font sizes,
constructions examples,
placeholders for classes and methods, and auto-generated “See Also” links.
Additionally it
is missing some items found in standard Javadoc documentation, including:
generics type information,
“Deprecated” tags and comments,
“See Also” links,
along with other minor differences.
Please send any questions or feedback to
bam@cs.cmu.edu.
This page displays the
Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
The official Sun™ documentation can be found here at
http://java.sun.com/javase/6/docs/api/.