|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
info.aduna.swing.config.ConfigSheet
public abstract class ConfigSheet
ConfigSheet is meant as a basis for user preference GUI panels that are shown of a ConfigPanel. As such it offers a generic API for initializing the contents of a ConfigSheet, applying its settings and resetting it to the default state, which will be used by the ConfigPanel.
Objects interested in changes in the contents of a ConfigSheet can register itself as ConfigSheetListener with the ConfigSheet.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary |
|---|
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
ConfigSheet()
Creates a new ConfigSheet with initially the empty String as its name. |
|
ConfigSheet(String name)
Sets a new ConfigSheet with the specified name. |
|
| Method Summary | |
|---|---|
void |
addConfigSheetListener(ConfigSheetListener l)
|
abstract void |
applySettings()
Sets the settings controlled by this ConfigSheet in the underlying datastructure. |
String |
getName()
|
abstract void |
initializeSettings()
Invoked just before the ConfigSheet is made the current ConfigSheet of the ConfigPanel. |
abstract boolean |
isChanged()
Returns whether there are any settings in this ConfigSheet that have been changed by the user but not applied yet. |
abstract boolean |
isDefaultsCapable()
Returns whether the ConfigSheet is capable of resetting the settings to the default values. |
protected void |
notifyContentsChanged()
|
void |
removeConfigSheetListener(ConfigSheetListener l)
|
abstract void |
resetToDefaultSettings()
Sets the settings controlled by this ConfigSheet back to their default values and updates the GUI of this ConfigSheet accordingly. |
void |
setName(String name)
Sets the name of this ConfigSheet. |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ConfigSheet()
public ConfigSheet(String name)
throws IllegalArgumentException
IllegalArgumentException - when the specified name is null.| Method Detail |
|---|
public void setName(String name)
throws IllegalArgumentException
setName in class ComponentIllegalArgumentException - when the specified name is null.public String getName()
getName in class Componentpublic abstract void initializeSettings()
public abstract boolean isChanged()
public abstract void applySettings()
public abstract boolean isDefaultsCapable()
public abstract void resetToDefaultSettings()
public void addConfigSheetListener(ConfigSheetListener l)
public void removeConfigSheetListener(ConfigSheetListener l)
protected void notifyContentsChanged()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||