public interface PaletteViewerPreferences
PaletteViewerPreferences
is used to store/persist the various
settings of a GEF palette.
IMPORTANT: This interface is not intended to be implemented
by clients. Clients should inherit from
DefaultPaletteViewerPreferences
. New methods may be added in the
future.
Modifier and Type | Field and Description |
---|---|
static int |
COLLAPSE_ALWAYS
This is a constant for one of the auto-collapse options.
|
static int |
COLLAPSE_AS_NEEDED
This is a constant for one of the auto-collapse options.
|
static int |
COLLAPSE_NEVER
This is a constant for one of the auto-collapse options.
|
static int |
LAYOUT_COLUMNS
This is a constant for one of the layout options.
|
static int |
LAYOUT_DETAILS
This is a constant for one of the layout options.
|
static int |
LAYOUT_FOLDER
Deprecated.
Use LAYOUT_COLUMNS instead.
|
static int |
LAYOUT_ICONS
This is a constant for one of the layout options.
|
static int |
LAYOUT_LIST
This is a constant for one of the layout options.
|
static java.lang.String |
PREFERENCE_AUTO_COLLAPSE
Property name for the auto-collapse setting.
|
static java.lang.String |
PREFERENCE_COLUMNS_ICON_SIZE
Property name for the large icon setting for columns layout.
|
static java.lang.String |
PREFERENCE_DETAILS_ICON_SIZE
Property name for the large icon setting for details layout.
|
static java.lang.String |
PREFERENCE_FOLDER_ICON_SIZE
Deprecated.
Use PREFERENCE_COLUMNS_ICON_SIZE instead.
|
static java.lang.String |
PREFERENCE_FONT
Property name for the palette font setting.
|
static java.lang.String |
PREFERENCE_ICONS_ICON_SIZE
Property name for the large icon setting for icons only layout.
|
static java.lang.String |
PREFERENCE_LAYOUT
Property name for the layout setting.
|
static java.lang.String |
PREFERENCE_LIST_ICON_SIZE
Property name for the large icon setting for list layout.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener) |
int |
getAutoCollapseSetting()
Returns the current auto-collapse setting.
|
FontData |
getFontData() |
int |
getLayoutSetting()
Returns the current layout setting.
|
int[] |
getSupportedLayoutModes()
Returns the layout modes that are supported.
|
boolean |
isSupportedLayoutMode(int layout)
This is a convenience method.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener) |
void |
setAutoCollapseSetting(int newVal)
Sets the auto-collapse setting.
|
void |
setCurrentUseLargeIcons(boolean newVal)
Sets the "Use Large Icons" option for the currently active layout.
|
void |
setFontData(FontData data)
Sets the FontData for the palette.
|
void |
setLayoutSetting(int newVal)
Sets the given setting as the current layout.
|
void |
setSupportedLayoutModes(int[] modes)
The client can restrict the modes that the palette supports using this
method.
|
void |
setUseLargeIcons(int layout,
boolean newVal)
Sets the "Use Large Icons" option for the given layout.
|
boolean |
useLargeIcons() |
boolean |
useLargeIcons(int layout)
Indicated whether large icons should be used with the given layout mode.
|
static final int COLLAPSE_ALWAYS
static final int COLLAPSE_NEVER
static final int COLLAPSE_AS_NEEDED
static final int LAYOUT_COLUMNS
static final int LAYOUT_FOLDER
static final int LAYOUT_LIST
static final int LAYOUT_ICONS
static final int LAYOUT_DETAILS
static final java.lang.String PREFERENCE_LAYOUT
static final java.lang.String PREFERENCE_AUTO_COLLAPSE
static final java.lang.String PREFERENCE_COLUMNS_ICON_SIZE
static final java.lang.String PREFERENCE_FOLDER_ICON_SIZE
static final java.lang.String PREFERENCE_LIST_ICON_SIZE
static final java.lang.String PREFERENCE_ICONS_ICON_SIZE
static final java.lang.String PREFERENCE_DETAILS_ICON_SIZE
static final java.lang.String PREFERENCE_FONT
void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- the PropertyChangeListener to be notified of changesPropertyChangeSupport.addPropertyChangeListener(java.beans.PropertyChangeListener)
int getAutoCollapseSetting()
Possible values returned:
FontData getFontData()
int getLayoutSetting()
Possible values returned:
int[] getSupportedLayoutModes()
setSupportedLayoutModes(int[])
boolean isSupportedLayoutMode(int layout)
layout
- LAYOUT_COLUMNS, LAYOUT_LIST, LAYOUT_ICONS, or LAYOUT_DETAILStrue
if the given layout is a supported modevoid removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- the PropertyChangeListener that should not be notified
hereafterPropertyChangeSupport.removePropertyChangeListener(java.beans.PropertyChangeListener)
void setAutoCollapseSetting(int newVal)
Possible values:
newVal
- One of the above-mentioned constantsvoid setFontData(FontData data)
data
- The FontData for the font to be used in the palettevoid setLayoutSetting(int newVal)
Possible values:
newVal
- One of the above-mentioned constantsvoid setCurrentUseLargeIcons(boolean newVal)
newVal
- true
if large icons are to be used with the
current layout settingvoid setSupportedLayoutModes(int[] modes)
If the default layout mode and/or the current layout mode are not in the given array, the first layout mode in the given array will be set to be the default/current layout.
NOTE: The given array of layout modes should have at least one, and is recommended to have at least two, of the recognized layout modes.
modes
- an array of layout modes desiredvoid setUseLargeIcons(int layout, boolean newVal)
true
false
true
false
layout
- any of the above-mentioned constantsnewVal
- true
if large icons are to be used with the given
layoutboolean useLargeIcons(int layout)
true
false
true
false
layout
- any of the above-mentioned constantstrue
if large icons are to be used with the given
layoutboolean useLargeIcons()
true
if large icons are to be used with the
currently active layoutCopyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.