|
Eclipse GEF 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
Field Summary | |
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 String |
PREFERENCE_AUTO_COLLAPSE
Property name for the auto-collapse setting. |
static String |
PREFERENCE_COLUMNS_ICON_SIZE
Property name for the large icon setting for columns layout. |
static String |
PREFERENCE_DETAILS_ICON_SIZE
Property name for the large icon setting for details layout. |
static String |
PREFERENCE_FOLDER_ICON_SIZE
Deprecated. Use PREFERENCE_COLUMNS_ICON_SIZE instead. |
static String |
PREFERENCE_FONT
Property name for the palette font setting. |
static String |
PREFERENCE_ICONS_ICON_SIZE
Property name for the large icon setting for icons only layout. |
static String |
PREFERENCE_LAYOUT
Property name for the layout setting. |
static String |
PREFERENCE_LIST_ICON_SIZE
Property name for the large icon setting for list layout. |
Method Summary | |
void |
addPropertyChangeListener(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(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. |
Field Detail |
public static final int COLLAPSE_ALWAYS
public static final int COLLAPSE_NEVER
public static final int COLLAPSE_AS_NEEDED
public static final int LAYOUT_COLUMNS
public static final int LAYOUT_FOLDER
public static final int LAYOUT_LIST
public static final int LAYOUT_ICONS
public static final int LAYOUT_DETAILS
public static final String PREFERENCE_LAYOUT
public static final String PREFERENCE_AUTO_COLLAPSE
public static final String PREFERENCE_COLUMNS_ICON_SIZE
public static final String PREFERENCE_FOLDER_ICON_SIZE
public static final String PREFERENCE_LIST_ICON_SIZE
public static final String PREFERENCE_ICONS_ICON_SIZE
public static final String PREFERENCE_DETAILS_ICON_SIZE
public static final String PREFERENCE_FONT
Method Detail |
public void addPropertyChangeListener(PropertyChangeListener listener)
PropertyChangeSupport.addPropertyChangeListener(
java.beans.PropertyChangeListener)
public int getAutoCollapseSetting()
Possible values returned:
public FontData getFontData()
public int getLayoutSetting()
Possible values returned:
public int[] getSupportedLayoutModes()
setSupportedLayoutModes(int[])
public boolean isSupportedLayoutMode(int layout)
layout
- LAYOUT_COLUMNS, LAYOUT_LIST, LAYOUT_ICONS, or LAYOUT_DETAILS
true
if the given layout is a supported modepublic void removePropertyChangeListener(PropertyChangeListener listener)
PropertyChangeSupport.removePropertyChangeListener(
java.beans.PropertyChangeListener)
public void setAutoCollapseSetting(int newVal)
Possible values:
newVal
- One of the above-mentioned constantspublic void setFontData(FontData data)
data
- The FontData for the font to be used in the palettepublic void setLayoutSetting(int newVal)
Possible values:
newVal
- One of the above-mentioned constantspublic void setCurrentUseLargeIcons(boolean newVal)
newVal
- true
if large icons are to be used with the current layout
settingpublic void 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 desiredpublic void 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 layoutpublic boolean useLargeIcons(int layout)
true
false
true
false
layout
- any of the above-mentioned constants
true
if large icons are to be used with the given layoutpublic boolean useLargeIcons()
true
if large icons are to be used with the currently active
layout
|
Eclipse GEF 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |