Liking cljdoc? Tell your friends :D

javax.swing.plaf.synth.ColorType

A typesafe enumeration of colors that can be fetched from a style.

Each SynthStyle has a set of ColorTypes that are accessed by way of the SynthStyle.getColor(SynthContext, ColorType) method. SynthStyle's installDefaults will install the FOREGROUND color as the foreground of the Component, and the BACKGROUND color to the background of the component (assuming that you have not explicitly specified a foreground and background color). Some components support more color based properties, for example JList has the property selectionForeground which will be mapped to FOREGROUND with a component state of SynthConstants.SELECTED.

The following example shows a custom SynthStyle that returns a red Color for the DISABLED state, otherwise a black color.

class MyStyle extends SynthStyle { private Color disabledColor = new ColorUIResource(Color.RED); private Color color = new ColorUIResource(Color.BLACK); protected Color getColorForState(SynthContext context, ColorType type){ if (context.getComponentState() == SynthConstants.DISABLED) { return disabledColor; } return color; } }

A typesafe enumeration of colors that can be fetched from a style.

Each SynthStyle has a set of ColorTypes that
are accessed by way of the
SynthStyle.getColor(SynthContext, ColorType) method.
SynthStyle's installDefaults will install
the FOREGROUND color
as the foreground of
the Component, and the BACKGROUND color to the background of
the component (assuming that you have not explicitly specified a
foreground and background color). Some components
support more color based properties, for
example JList has the property
selectionForeground which will be mapped to
FOREGROUND with a component state of
SynthConstants.SELECTED.

The following example shows a custom SynthStyle that returns
a red Color for the DISABLED state, otherwise a black color.


class MyStyle extends SynthStyle {
    private Color disabledColor = new ColorUIResource(Color.RED);
    private Color color = new ColorUIResource(Color.BLACK);
    protected Color getColorForState(SynthContext context, ColorType type){
        if (context.getComponentState() == SynthConstants.DISABLED) {
            return disabledColor;
        }
        return color;
    }
}
raw docstring

javax.swing.plaf.synth.core

No vars found in this namespace.

javax.swing.plaf.synth.Region

A distinct rendering area of a Swing component. A component may support one or more regions. Specific component regions are defined by the typesafe enumeration in this class.

Regions are typically used as a way to identify the Components and areas a particular style is to apply to. Synth's file format allows you to bind styles based on the name of a Region. The name is derived from the field name of the constant:

Map all characters to lowercase. Map the first character to uppercase. Map the first character after underscores to uppercase. Remove all underscores.

For example, to identify the SPLIT_PANE Region you would use SplitPane. The following shows a custom SynthStyleFactory that returns a specific style for split panes:

public SynthStyle getStyle(JComponent c, Region id) { if (id == Region.SPLIT_PANE) { return splitPaneStyle; } ... } The following xml accomplishes the same thing:

<style id="splitPaneStyle"> ... </style>

<bind style="splitPaneStyle" type="region" key="SplitPane"/>

A distinct rendering area of a Swing component.  A component may
support one or more regions.  Specific component regions are defined
by the typesafe enumeration in this class.

Regions are typically used as a way to identify the Components
and areas a particular style is to apply to. Synth's file format allows you
to bind styles based on the name of a Region.
The name is derived from the field name of the constant:

 Map all characters to lowercase.
 Map the first character to uppercase.
 Map the first character after underscores to uppercase.
 Remove all underscores.

For example, to identify the SPLIT_PANE
Region you would use SplitPane.
The following shows a custom SynthStyleFactory
that returns a specific style for split panes:


   public SynthStyle getStyle(JComponent c, Region id) {
       if (id == Region.SPLIT_PANE) {
           return splitPaneStyle;
       }
       ...
   }
The following xml
accomplishes the same thing:


<style id="splitPaneStyle">
  ...
</style>
<bind style="splitPaneStyle" type="region" key="SplitPane"/>
raw docstring

javax.swing.plaf.synth.SynthCheckBoxMenuItemUI

Provides the Synth L&F UI delegate for JCheckBoxMenuItem.

Provides the Synth L&F UI delegate for
JCheckBoxMenuItem.
raw docstring

javax.swing.plaf.synth.SynthCheckBoxUI

Provides the Synth L&F UI delegate for JCheckBox.

Provides the Synth L&F UI delegate for
JCheckBox.
raw docstring

javax.swing.plaf.synth.SynthColorChooserUI

Provides the Synth L&F UI delegate for JColorChooser.

Provides the Synth L&F UI delegate for
JColorChooser.
raw docstring

javax.swing.plaf.synth.SynthConstants

Constants used by Synth. Not all Components support all states. A Component will at least be in one of the primary states. That is, the return value from SynthContext.getComponentState() will at least be one of ENABLED, MOUSE_OVER, PRESSED or DISABLED, and may also contain FOCUSED, SELECTED or DEFAULT.

Constants used by Synth. Not all Components support all states. A
Component will at least be in one of the primary states. That is, the
return value from SynthContext.getComponentState() will at
least be one of ENABLED, MOUSE_OVER,
PRESSED or DISABLED, and may also contain
FOCUSED, SELECTED or DEFAULT.
raw docstring

No vars found in this namespace.

javax.swing.plaf.synth.SynthContext

An immutable transient object containing contextual information about a Region. A SynthContext should only be considered valid for the duration of the method it is passed to. In other words you should not cache a SynthContext that is passed to you and expect it to remain valid.

An immutable transient object containing contextual information about
a Region. A SynthContext should only be
considered valid for the duration
of the method it is passed to. In other words you should not cache
a SynthContext that is passed to you and expect it to
remain valid.
raw docstring

javax.swing.plaf.synth.SynthDesktopIconUI

Provides the Synth L&F UI delegate for a minimized internal frame on a desktop.

Provides the Synth L&F UI delegate for a minimized internal frame on a desktop.
raw docstring

javax.swing.plaf.synth.SynthDesktopPaneUI

Provides the Synth L&F UI delegate for JDesktopPane.

Provides the Synth L&F UI delegate for
JDesktopPane.
raw docstring

javax.swing.plaf.synth.SynthEditorPaneUI

Provides the Synth L&F UI delegate for JEditorPane.

Provides the Synth L&F UI delegate for
JEditorPane.
raw docstring

javax.swing.plaf.synth.SynthFormattedTextFieldUI

Provides the Synth L&F UI delegate for JFormattedTextField.

Provides the Synth L&F UI delegate for
JFormattedTextField.
raw docstring

javax.swing.plaf.synth.SynthInternalFrameUI

Provides the Synth L&F UI delegate for JInternalFrame.

Provides the Synth L&F UI delegate for
JInternalFrame.
raw docstring

javax.swing.plaf.synth.SynthListUI

Provides the Synth L&F UI delegate for JList.

Provides the Synth L&F UI delegate for
JList.
raw docstring

javax.swing.plaf.synth.SynthLookAndFeel

SynthLookAndFeel provides the basis for creating a customized look and feel. SynthLookAndFeel does not directly provide a look, all painting is delegated. You need to either provide a configuration file, by way of the load(java.io.InputStream, java.lang.Class<?>) method, or provide your own SynthStyleFactory to setStyleFactory(javax.swing.plaf.synth.SynthStyleFactory). Refer to the package summary for an example of loading a file, and SynthStyleFactory for an example of providing your own SynthStyleFactory to setStyleFactory.

Warning: This class implements Serializable as a side effect of it extending BasicLookAndFeel. It is not intended to be serialized. An attempt to serialize it will result in NotSerializableException.

SynthLookAndFeel provides the basis for creating a customized look and
feel. SynthLookAndFeel does not directly provide a look, all painting is
delegated.
You need to either provide a configuration file, by way of the
load(java.io.InputStream, java.lang.Class<?>) method, or provide your own SynthStyleFactory
to setStyleFactory(javax.swing.plaf.synth.SynthStyleFactory). Refer to the
package summary for an example of
loading a file, and SynthStyleFactory for
an example of providing your own SynthStyleFactory to
setStyleFactory.

Warning:
This class implements Serializable as a side effect of it
extending BasicLookAndFeel. It is not intended to be serialized.
An attempt to serialize it will
result in NotSerializableException.
raw docstring

javax.swing.plaf.synth.SynthMenuBarUI

Provides the Synth L&F UI delegate for JMenuBar.

Provides the Synth L&F UI delegate for
JMenuBar.
raw docstring

javax.swing.plaf.synth.SynthMenuItemUI

Provides the Synth L&F UI delegate for JMenuItem.

Provides the Synth L&F UI delegate for
JMenuItem.
raw docstring

javax.swing.plaf.synth.SynthMenuUI

Provides the Synth L&F UI delegate for JMenu.

Provides the Synth L&F UI delegate for
JMenu.
raw docstring

javax.swing.plaf.synth.SynthOptionPaneUI

Provides the Synth L&F UI delegate for JOptionPane.

Provides the Synth L&F UI delegate for
JOptionPane.
raw docstring

javax.swing.plaf.synth.SynthPainter

SynthPainter is used for painting portions of JComponents. At a minimum each JComponent has two paint methods: one for the border and one for the background. Some JComponents have more than one Region, and as a consequence more paint methods.

Instances of SynthPainter are obtained from the SynthStyle.getPainter(javax.swing.plaf.synth.SynthContext) method.

You typically supply a SynthPainter by way of Synth's file format. The following example registers a painter for all JButtons that will render the image myImage.png:

<style id="buttonStyle"> <imagePainter path="myImage.png" sourceInsets="2 2 2 2" paintCenter="true" stretch="true"/> <insets top="2" bottom="2" left="2" right="2"/> </style>

<bind style="buttonStyle" type="REGION" key="button"/>

SynthPainter is abstract in so far as it does no painting, all the methods are empty. While none of these methods are typed to throw an exception, subclasses can assume that valid arguments are passed in, and if not they can throw a NullPointerException or IllegalArgumentException in response to invalid arguments.

SynthPainter is used for painting portions of
JComponents. At a minimum each JComponent
has two paint methods: one for the border and one for the background. Some
JComponents have more than one Region, and as
a consequence more paint methods.

Instances of SynthPainter are obtained from the
SynthStyle.getPainter(javax.swing.plaf.synth.SynthContext) method.

You typically supply a SynthPainter by way of Synth's
file format. The following
example registers a painter for all JButtons that will
render the image myImage.png:


 <style id="buttonStyle">
   <imagePainter path="myImage.png" sourceInsets="2 2 2 2"
                 paintCenter="true" stretch="true"/>
   <insets top="2" bottom="2" left="2" right="2"/>
 </style>
 <bind style="buttonStyle" type="REGION" key="button"/>

SynthPainter is abstract in so far as it does no painting,
all the methods
are empty. While none of these methods are typed to throw an exception,
subclasses can assume that valid arguments are passed in, and if not
they can throw a NullPointerException or
IllegalArgumentException in response to invalid arguments.
raw docstring

javax.swing.plaf.synth.SynthPasswordFieldUI

Provides the Synth L&F UI delegate for JPasswordField.

Provides the Synth L&F UI delegate for
JPasswordField.
raw docstring

javax.swing.plaf.synth.SynthPopupMenuUI

Provides the Synth L&F UI delegate for JPopupMenu.

Provides the Synth L&F UI delegate for
JPopupMenu.
raw docstring

javax.swing.plaf.synth.SynthRadioButtonMenuItemUI

Provides the Synth L&F UI delegate for JRadioButtonMenuItem.

Provides the Synth L&F UI delegate for
JRadioButtonMenuItem.
raw docstring

javax.swing.plaf.synth.SynthRadioButtonUI

Provides the Synth L&F UI delegate for JRadioButton.

Provides the Synth L&F UI delegate for
JRadioButton.
raw docstring

javax.swing.plaf.synth.SynthRootPaneUI

Provides the Synth L&F UI delegate for JRootPane.

Provides the Synth L&F UI delegate for
JRootPane.
raw docstring

javax.swing.plaf.synth.SynthScrollPaneUI

Provides the Synth L&F UI delegate for JScrollPane.

Provides the Synth L&F UI delegate for
JScrollPane.
raw docstring

javax.swing.plaf.synth.SynthSpinnerUI

Provides the Synth L&F UI delegate for JSpinner.

Provides the Synth L&F UI delegate for
JSpinner.
raw docstring

javax.swing.plaf.synth.SynthStyle

SynthStyle is a set of style properties. Each SynthUI references at least one SynthStyle that is obtained using a SynthStyleFactory. You typically don't need to interact with this class directly, rather you will load a Synth File Format file into SynthLookAndFeel that will create a set of SynthStyles.

SynthStyle is a set of style properties.
Each SynthUI references at least one
SynthStyle that is obtained using a
SynthStyleFactory. You typically don't need to interact with
this class directly, rather you will load a
Synth File Format file into
SynthLookAndFeel that will create a set of SynthStyles.
raw docstring

javax.swing.plaf.synth.SynthStyleFactory

Factory used for obtaining SynthStyles. Each of the Synth ComponentUIs 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());

Factory used for obtaining SynthStyles.  Each of the
Synth ComponentUIs 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());
raw docstring

javax.swing.plaf.synth.SynthTabbedPaneUI

Provides the Synth L&F UI delegate for JTabbedPane.

Looks up the selectedTabPadInsets property from the Style, which represents additional insets for the selected tab.

Provides the Synth L&F UI delegate for
JTabbedPane.

Looks up the selectedTabPadInsets property from the Style,
which represents additional insets for the selected tab.
raw docstring

javax.swing.plaf.synth.SynthTableHeaderUI

Provides the Synth L&F UI delegate for JTableHeader.

Provides the Synth L&F UI delegate for
JTableHeader.
raw docstring

javax.swing.plaf.synth.SynthTableUI

Provides the Synth L&F UI delegate for JTable.

Provides the Synth L&F UI delegate for
JTable.
raw docstring

javax.swing.plaf.synth.SynthTextAreaUI

Provides the look and feel for a plain text editor in the Synth look and feel. In this implementation the default UI is extended to act as a simple view factory.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.

Provides the look and feel for a plain text editor in the
Synth look and feel. In this implementation the default UI
is extended to act as a simple view factory.

Warning:
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Swing.  As of 1.4, support for long term storage
of all JavaBeans™
has been added to the java.beans package.
Please see XMLEncoder.
raw docstring

javax.swing.plaf.synth.SynthTextFieldUI

Provides the Synth L&F UI delegate for JTextField.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.

Provides the Synth L&F UI delegate for JTextField.

Warning:
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Swing.  As of 1.4, support for long term storage
of all JavaBeans™
has been added to the java.beans package.
Please see XMLEncoder.
raw docstring

javax.swing.plaf.synth.SynthTextPaneUI

Provides the look and feel for a styled text editor in the Synth look and feel.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.

Provides the look and feel for a styled text editor in the
Synth look and feel.

Warning:
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Swing.  As of 1.4, support for long term storage
of all JavaBeans™
has been added to the java.beans package.
Please see XMLEncoder.
raw docstring

javax.swing.plaf.synth.SynthToggleButtonUI

Provides the Synth L&F UI delegate for JToggleButton.

Provides the Synth L&F UI delegate for
JToggleButton.
raw docstring

javax.swing.plaf.synth.SynthToolBarUI

Provides the Synth L&F UI delegate for JToolBar.

Provides the Synth L&F UI delegate for
JToolBar.
raw docstring

javax.swing.plaf.synth.SynthUI

SynthUI is used to fetch the SynthContext for a particular Component.

SynthUI is used to fetch the SynthContext for a particular Component.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close