|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.infonode.properties.propertymap.PropertyMapContainer
net.infonode.properties.gui.util.ComponentProperties
public class ComponentProperties
Properties and property values for a JComponent
.
Field Summary | |
---|---|
static ColorProperty |
BACKGROUND_COLOR
Component background color. |
static BorderProperty |
BORDER
Component border. |
static FontProperty |
FONT
Component text font. |
static ColorProperty |
FOREGROUND_COLOR
Component foreground color. |
static InsetsProperty |
INSETS
Component insets inside the border. |
static PropertyMapGroup |
PROPERTIES
Property group for all component properties. |
Constructor Summary | |
---|---|
ComponentProperties()
Creates an empty property object. |
|
ComponentProperties(ComponentProperties inheritFrom)
Creates a property object that inherit values from another property object. |
|
ComponentProperties(PropertyMap map)
Creates a property map containing the map. |
Method Summary | |
---|---|
ComponentProperties |
addSuperObject(ComponentProperties properties)
Adds a super object from which property values are inherited. |
void |
applyTo(javax.swing.JComponent component)
Applies the property values to a component. |
void |
applyTo(javax.swing.JComponent component,
Direction insetsDirection)
Applies the property values to a component and rotates the insets in the given direction. |
java.awt.Color |
getBackgroundColor()
Returns the component background color. |
javax.swing.border.Border |
getBorder()
Returns the component border. |
java.awt.Font |
getFont()
Returns the component text font. |
java.awt.Color |
getForegroundColor()
Returns the component foreground color. |
java.awt.Insets |
getInsets()
Returns the component insets inside the border. |
ComponentProperties |
removeSuperObject()
Removes the last added super object. |
ComponentProperties |
removeSuperObject(ComponentProperties superObject)
Removes the given super object. |
ComponentProperties |
setBackgroundColor(java.awt.Color color)
Sets the component background color. |
ComponentProperties |
setBorder(javax.swing.border.Border border)
Sets the component border. |
ComponentProperties |
setFont(java.awt.Font font)
Sets the component text font. |
ComponentProperties |
setForegroundColor(java.awt.Color foregroundColor)
Sets the component foreground color. |
ComponentProperties |
setInsets(java.awt.Insets insets)
Sets the component insets inside the border. |
Methods inherited from class net.infonode.properties.propertymap.PropertyMapContainer |
---|
getMap |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final PropertyMapGroup PROPERTIES
public static final BorderProperty BORDER
public static final InsetsProperty INSETS
public static final ColorProperty FOREGROUND_COLOR
public static final FontProperty FONT
public static final ColorProperty BACKGROUND_COLOR
Constructor Detail |
---|
public ComponentProperties()
public ComponentProperties(PropertyMap map)
map
- the property mappublic ComponentProperties(ComponentProperties inheritFrom)
inheritFrom
- the object from which to inherit property valuesMethod Detail |
---|
public ComponentProperties addSuperObject(ComponentProperties properties)
properties
- the object from which to inherit property values
public ComponentProperties removeSuperObject()
public ComponentProperties removeSuperObject(ComponentProperties superObject)
superObject
- super object to remove
public ComponentProperties setBorder(javax.swing.border.Border border)
border
- the component border
public ComponentProperties setInsets(java.awt.Insets insets)
insets
- the component insets
public ComponentProperties setBackgroundColor(java.awt.Color color)
color
- the background color, null means no background
public java.awt.Insets getInsets()
public javax.swing.border.Border getBorder()
public java.awt.Color getBackgroundColor()
public java.awt.Font getFont()
public java.awt.Color getForegroundColor()
public ComponentProperties setForegroundColor(java.awt.Color foregroundColor)
foregroundColor
- the component foreground color
public ComponentProperties setFont(java.awt.Font font)
font
- the component text font
public void applyTo(javax.swing.JComponent component)
component
- the component on which to apply the property valuespublic void applyTo(javax.swing.JComponent component, Direction insetsDirection)
component
- the component on which to apply the property valuesinsetsDirection
- insets direction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |