|
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.Looks
public abstract class Looks
Static factory class for different kinds of useful Looks. For looks
which can be constructed using module layer
XMLFileSystem
s, a sample of such XML definition is given
in the Javadoc.
Method Summary | |
---|---|
static Look |
bean()
Look that presents an object as a JavaBean. |
static Look |
childrenSelectorProvider(String name,
Look look,
LookSelector selector)
|
static Look |
composite(String name,
Look[] delegates)
Look that is composite of the delegates specified by a given context or composite of array of looks. |
static Look |
filter(String name,
Look delegate,
long mask)
Look that filters the features of look which delegates. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static final Look bean()
To create this look from an XML layer type:
<file name="NameOfYourLook.instance" > <attr name="instanceClass" stringvalue="org.netbeans.spi.looks.Look" /> <attr name="instanceCreate" methodvalue="org.netbeans.spi.looks.Looks.bean" /> </file>
BeanNode
public static final Look filter(String name, Look delegate, long mask)
To create this filter look from an XML layer type:
<file name="NameOfYourLook.instance" > <attr name="instanceClass" stringvalue="org.netbeans.spi.looks.Look" /> <attr name="instanceCreate" methodvalue="org.netbeans.spi.looks.Looks.filter" /> <!--The path to declaration of delegate look.--> <attr name="delegateLook" stringvalue="Looks/MyLayer/MyLooks/FooLook" /> <!--Optionally! The mask can be specified in mask attribute. The default mask is ALL_METHODS.--> <attr name="ALL_METHODS" boolvalue="false" /> <!--Optionally! Mask specification of a methods individually, can enlarge the mask in detail.--> <attr name="GET_NAME" boolvalue="false" /> <attr name="GET_ICON" boolvalue="true" /> ... </file>The
<attr name="delegateLook" />
attribute can directly return
an instance of your look (instead of specifying its path). So one can replace
that line with:
<attr name="delegateLook" newvalue="yourpkg.YourLook" />or if one wants to use
methodvalue
:
<attr name="delegateLook" methodvalue="yourpkg.YourFactoryClass.yourMethod" />under the condition that there is a YourFactoryClass in yourpkg that contains following method:
package yourpkg; public final class YourFactoryClass { public static Look yourMethod () { Look l = ...; return l; } }
delegate
- The look the FilterLook will delegate tomask
- Binary mask where 1 means that the method call will be
forwarded to the delegate look. 0 means that the delegation
will be suppressed
ProxyLook for values for method masking
public static final Look composite(String name, Look[] delegates)
null
or
not false
value is chosen. If the attribute is multivalued
(e.g. child nodes or properties) the result is set produced by merging
results from all sublooks.
To create this composite look from an XML layer type:
<file name="NameOfYourNamespaceSelector.instance" > <attr name="instanceClass" stringvalue="org.netbeans.spi.looks.Look" /> <attr name="instanceCreate" methodvalue="org.netbeans.spi.looks.Looks.composite" /> <attr name="context" stringvalue="Looks/Types/" /> </file>
name
- Name of the composite look.delegates
- Sublooks of the look.
ProxyLook for more info about looks
composition.
public static final Look childrenSelectorProvider(String name, Look look, LookSelector selector)
|
org.netbeans.modules.looks/2 1.12 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |