| java.lang.Object com.ibm.richtext.textpanel.TextPanelSettings
TextPanelSettings | final public class TextPanelSettings implements Cloneable,Serializable(Code) | | This class contains settings used when constructing an MTextPanel.
The settings controled by this class include:
- whether the text in the MTextPanel can be scrolled
- whether scroll bars in the MTextPanel are visible
- whether the text in the MTextPanel can be selected
- whether the text in the MTextPanel can be edited
- whether lines of text wrap to the MTextPanel's width, or
only end at paragraph separators
- the default values for unspecified styles
Some settings are dependent on others. Scroll bars are visible
only if the text is scrollable. Also, text which is not editable
if it is not selectable.
See Also: MTextPanel |
Constructor Summary | |
public | TextPanelSettings() Create a TextPanelSettings instance with all settings
set to true. |
Method Summary | |
public void | addDefaultValues(AttributeMap map) Add the key-value pairs in the given AttributeMap to the
default values. | public Object | clone() Return a new TextPanelSettings instance with the
same settings as this. | public boolean | equals(Object rhs) Compare this to another Object. | public AttributeMap | getDefaultValues() Return the AttributeMap of default values for certain keys. | public boolean | getEditable() Return the editable setting, which determines whether
text in an MTextPanel can be edited. | public boolean | getScrollBarsVisible() Return the scrollBarsVisible setting, which determines whether
scroll bars in an MTextPanel are visible. | public boolean | getScrollable() Return the scrollable setting, which determines whether text
in an MTextPanel can be scrolled. | public boolean | getSelectable() Return the selectable setting, which determines whether
text in an MTextPanel can be selected. | public boolean | getWraps() Return the wraps setting, which determines whether
lines of text wrap to the length of the MTextPanel,
or only at paragraph separators. | public int | hashCode() Return the hash code for this Object. | public void | setEditable(boolean editable) Set the editable setting.
Parameters: editable - the editable setting. | public void | setScrollBarsVisible(boolean vis) Set the scrollBarsVisible setting.
Parameters: vis - the scrollBarsVisible setting. | public void | setScrollable(boolean scrollable) Set the scrollable setting.
Parameters: scrollable - the scrollable setting. | public void | setSelectable(boolean selectable) Set the selectable setting.
Parameters: selectable - the selectable setting. | public void | setWraps(boolean wraps) Set the wraps setting. |
serialVersionUID | final static long serialVersionUID(Code) | | |
TextPanelSettings | public TextPanelSettings()(Code) | | Create a TextPanelSettings instance with all settings
set to true.
|
addDefaultValues | public void addDefaultValues(AttributeMap map)(Code) | | Add the key-value pairs in the given AttributeMap to the
default values. If a key does not appear in the given
AttributeMap, its value in the default value map is
unchanged.
Parameters: map - an AttributeMap containing new default values |
clone | public Object clone()(Code) | | Return a new TextPanelSettings instance with the
same settings as this.
a new TextPanelSettings instance |
equals | public boolean equals(Object rhs)(Code) | | Compare this to another Object. This is equal
to another Object if the other Object is a
TextPanelSettings instance with the same
settings as this one.
Parameters: rhs - the Object to compare to |
getDefaultValues | public AttributeMap getDefaultValues()(Code) | | Return the AttributeMap of default values for certain keys.
When a key in this AttributeMap is not specified, its value
is taken from this AttributeMap.
the AttributeMap of default values See Also: MTextPanel.getDefaultValues |
getEditable | public boolean getEditable()(Code) | | Return the editable setting, which determines whether
text in an MTextPanel can be edited.
the editable setting |
getScrollBarsVisible | public boolean getScrollBarsVisible()(Code) | | Return the scrollBarsVisible setting, which determines whether
scroll bars in an MTextPanel are visible.
the scrollBarsVisible setting |
getScrollable | public boolean getScrollable()(Code) | | Return the scrollable setting, which determines whether text
in an MTextPanel can be scrolled.
the scrollable setting |
getSelectable | public boolean getSelectable()(Code) | | Return the selectable setting, which determines whether
text in an MTextPanel can be selected.
the selectable setting |
getWraps | public boolean getWraps()(Code) | | Return the wraps setting, which determines whether
lines of text wrap to the length of the MTextPanel,
or only at paragraph separators.
the wraps setting |
hashCode | public int hashCode()(Code) | | Return the hash code for this Object.
the hash code for this Object |
setEditable | public void setEditable(boolean editable)(Code) | | Set the editable setting.
Parameters: editable - the editable setting. If true,the selectable setting is also set to true. |
setScrollBarsVisible | public void setScrollBarsVisible(boolean vis)(Code) | | Set the scrollBarsVisible setting.
Parameters: vis - the scrollBarsVisible setting. If true,the scrollable setting is also set to true. |
setScrollable | public void setScrollable(boolean scrollable)(Code) | | Set the scrollable setting.
Parameters: scrollable - the scrollable setting. If false,the scrollBarsVisible setting is also set to false. |
setSelectable | public void setSelectable(boolean selectable)(Code) | | Set the selectable setting.
Parameters: selectable - the selectable setting. If false,the editable setting is also set to false. |
setWraps | public void setWraps(boolean wraps)(Code) | | Set the wraps setting.
Parameters: wraps - the wraps setting |
|
|