Package org.tn5250j
Class SessionConfig
- java.lang.Object
-
- org.tn5250j.SessionConfig
-
public class SessionConfig extends java.lang.ObjectA host session configuration object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classSessionConfig.SessionConfigurationThis is the new intended way to access configuration.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCONFIG_KEYPAD_ENABLEDstatic java.lang.StringCONFIG_KEYPAD_FONT_SIZEstatic java.lang.StringCONFIG_KEYPAD_MNEMONICSstatic floatKEYPAD_FONT_SIZE_DEFAULT_VALUEstatic java.lang.StringNOstatic java.lang.StringYES
-
Constructor Summary
Constructors Constructor Description SessionConfig(java.lang.String configurationResource, java.lang.String sessionName)
-
Method Summary
Modifier and Type Method Description voidaddSessionConfigListener(SessionConfigListener listener)Add a SessionConfigListener to the listener list.voidfirePropertyChange(java.lang.Object source, java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)java.awt.ColorgetColorProperty(java.lang.String prop)Deprecated.SessionConfig.SessionConfigurationgetConfig()java.lang.StringgetConfigurationResource()floatgetFloatProperty(java.lang.String prop)Deprecated.floatgetFloatProperty(java.lang.String propertyName, float defaultValue)Deprecated.intgetIntegerProperty(java.lang.String prop)Deprecated.java.util.PropertiesgetProperties()Deprecated.java.awt.RectanglegetRectangleProperty(java.lang.String key)java.lang.StringgetSessionName()java.lang.StringgetStringProperty(java.lang.String prop)Deprecated.booleanisPropertyExists(java.lang.String prop)java.lang.ObjectremoveProperty(java.lang.String key)voidremoveSessionConfigListener(SessionConfigListener listener)Remove a SessionListener from the listener list.voidsaveSessionProps()voidsaveSessionProps(java.awt.Container parent)voidsetKeypadMnemonicsAndFireChangeEvent(KeyMnemonic[] keyMnemonics)voidsetModified()java.lang.ObjectsetProperty(java.lang.String key, java.lang.String value)voidsetRectangleProperty(java.lang.String key, java.awt.Rectangle rect)
-
-
-
Field Detail
-
KEYPAD_FONT_SIZE_DEFAULT_VALUE
public static final float KEYPAD_FONT_SIZE_DEFAULT_VALUE
- See Also:
- Constant Field Values
-
CONFIG_KEYPAD_FONT_SIZE
public static final java.lang.String CONFIG_KEYPAD_FONT_SIZE
- See Also:
- Constant Field Values
-
CONFIG_KEYPAD_ENABLED
public static final java.lang.String CONFIG_KEYPAD_ENABLED
- See Also:
- Constant Field Values
-
CONFIG_KEYPAD_MNEMONICS
public static final java.lang.String CONFIG_KEYPAD_MNEMONICS
- See Also:
- Constant Field Values
-
YES
public static final java.lang.String YES
- See Also:
- Constant Field Values
-
NO
public static final java.lang.String NO
- See Also:
- Constant Field Values
-
-
Method Detail
-
getConfigurationResource
public java.lang.String getConfigurationResource()
-
getSessionName
public java.lang.String getSessionName()
-
firePropertyChange
public final void firePropertyChange(java.lang.Object source, java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
-
getProperties
@Deprecated public java.util.Properties getProperties()
Deprecated.- Returns:
- properties
-
setModified
public void setModified()
-
saveSessionProps
public void saveSessionProps(java.awt.Container parent)
-
saveSessionProps
public void saveSessionProps()
-
isPropertyExists
public boolean isPropertyExists(java.lang.String prop)
-
getStringProperty
@Deprecated public java.lang.String getStringProperty(java.lang.String prop)
Deprecated.- Parameters:
prop- properties- Returns:
- string from properties
-
getIntegerProperty
@Deprecated public int getIntegerProperty(java.lang.String prop)
Deprecated.- Parameters:
prop- properties- Returns:
- integer from properties
-
getColorProperty
@Deprecated public java.awt.Color getColorProperty(java.lang.String prop)
Deprecated.- Parameters:
prop- properties- Returns:
- color from properties
-
getRectangleProperty
public java.awt.Rectangle getRectangleProperty(java.lang.String key)
-
setRectangleProperty
public void setRectangleProperty(java.lang.String key, java.awt.Rectangle rect)
-
getFloatProperty
@Deprecated public float getFloatProperty(java.lang.String prop)
Deprecated.- Parameters:
prop- property name- Returns:
- float from properties
-
getFloatProperty
@Deprecated public float getFloatProperty(java.lang.String propertyName, float defaultValue)Deprecated.- Parameters:
propertyName- name of the keydefaultValue- provide default value if key is not present- Returns:
- parsed float from properties
-
setProperty
public java.lang.Object setProperty(java.lang.String key, java.lang.String value)
-
removeProperty
public java.lang.Object removeProperty(java.lang.String key)
-
addSessionConfigListener
public final void addSessionConfigListener(SessionConfigListener listener)
Add a SessionConfigListener to the listener list.- Parameters:
listener- The SessionListener to be added
-
removeSessionConfigListener
public final void removeSessionConfigListener(SessionConfigListener listener)
Remove a SessionListener from the listener list.- Parameters:
listener- The SessionListener to be removed
-
getConfig
public SessionConfig.SessionConfiguration getConfig()
-
setKeypadMnemonicsAndFireChangeEvent
public void setKeypadMnemonicsAndFireChangeEvent(KeyMnemonic[] keyMnemonics)
-
-