|
org.netbeans.modules.looks/2 1.12 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.spi.looks.Selectors
public abstract class Selectors
Static factory class providing useful look selectors. For looks which
can be constructed using module layer
XMLFileSystem
s, a sample of such XML definition is given
in their Javadoc.
Method Summary | |
---|---|
static LookSelector |
array(Look[] delegates)
Utility method, creates a LookSelector which will allways return the looks put into this method as a parameter. |
static LookSelector |
composite(LookSelector[] selectors)
Creates composite selector which merges all selectors given as parameter and removed duplicities. |
static LookSelector |
decorator(LookSelector lookSelector,
Look decoratingLook)
Decorates looks found by given selector, with a decorating look. |
static LookSelector |
defaultTypes()
NamespaceSelector which searches for a look in default namespace "Looks/Types/". |
static LookSelector |
first(LookSelector delegate)
Utility method, creates a LookSelector which selects the first only Look from another LookSelector which it delegates to. |
static LookSelector |
namespaceTypes(String contextPrefix)
Searches for a look in namespace given name of context to search. |
static LookSelector |
selector(ChangeableLookProvider provider)
Creates a LookSelector which may change it's content. |
static LookSelector |
selector(LookProvider provider)
Creates a LookSelector based on LookProvider which will never change it's content. |
static LookSelector |
singleton(Look delegate)
Utility method, creates a LookSelector which will allways return the look put into this method as a parameter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static final LookSelector selector(LookProvider provider)
provider
- The concrete implementation of finding the Looks
LookProvider
public static final LookSelector selector(ChangeableLookProvider provider)
provider
- The concrete implementation of finding the Looks and
firing changes of the LookSelector content
ChangeableLookProvider
public static final LookSelector singleton(Look delegate)
delegate
- The Look to be returned from the selector.
public static final LookSelector array(Look[] delegates)
delegates
- Array of Looks to be returned from the selector.
public static final LookSelector first(LookSelector delegate)
delegate
- LookSelector from which the first Look only will be returned
public static final LookSelector defaultTypes()
To create this namespace selector from an XML layer type:
<file name="NameOfYourNamaspaceSelector.instance" > <attr name="instanceClass" stringvalue="org.netbeans.spi.looks.LookSelector" /> <attr name="instanceCreate" methodvalue="org.netbeans.spi.looks.Selectors.defaultTypes" /> </file>
namespaceTypes(String)
public static final LookSelector namespaceTypes(String contextPrefix)
To create this namespace selector from an XML layer type:
<file name="NameOfYourNamaspaceSelector.instance" > <attr name="instanceClass" stringvalue="org.netbeans.spi.looks.LookSelector" /> <attr name="instanceCreate" methodvalue="org.netbeans.spi.looks.Selectors.namespaceTypes" /> <!--Optionally! The context prefix for the namespace. The default prefix is "Looks/Types/".--> <attr name="context" stringvalue="Looks/Selectors/MyTypes/" /> </file>
contextPrefix
- the Context to be searched
public static final LookSelector decorator(LookSelector lookSelector, Look decoratingLook)
To create this decorator selector from an XML layer type:
<file name="NameOfYourDecoratorSelector.instance" > <attr name="instanceClass" stringvalue="org.netbeans.spi.looks.LookSelector" /> <attr name="instanceCreate" methodvalue="org.netbeans.spi.looks.Selectors.decorator" /> <!--The path to declaration of look selector searches for the looks.--> <attr name="lookSelector" stringvalue="Looks/Selectors/MyTypes/" /> <!--The path to declaration of decorating look.--> <attr name="decoratingLook" stringvalue="Looks/MyLayer/MyLooks/FooLook" /> <!--Optionally! The additionally features are append at last. The default value is false.--> </file>
lookSelector
- Selector used for searching for Looks for given represented
objectdecoratingLook
- Look which will decorate all the subnodes.
public static final LookSelector composite(LookSelector[] selectors)
selectors
- Array of selctors to be merged.
|
org.netbeans.modules.looks/2 1.12 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |