Package org.eclipse.gef.ui.palette
Interface PaletteViewerPreferences
- All Known Implementing Classes:
- DefaultPaletteViewerPreferences
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.
- @noimplement
- This interface is not intended to be implemented by clients.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intThis is a constant for one of the auto-collapse options.static final intThis is a constant for one of the auto-collapse options.static final intThis is a constant for one of the auto-collapse options.static final intThis is a constant for one of the layout options.static final intThis is a constant for one of the layout options.static final intDeprecated.Use LAYOUT_COLUMNS instead.static final intThis is a constant for one of the layout options.static final intThis is a constant for one of the layout options.static final StringProperty name for the auto-collapse setting.static final StringProperty name for the large icon setting for columns layout.static final StringProperty name for the large icon setting for details layout.static final StringDeprecated.Use PREFERENCE_COLUMNS_ICON_SIZE instead.static final StringProperty name for the palette font setting.static final StringProperty name for the large icon setting for icons only layout.static final StringProperty name for the layout setting.static final StringProperty name for the large icon setting for list layout.static final StringLinux Only Property name for enabling or disabling the scrollbars overlay.
- 
Method SummaryModifier and TypeMethodDescriptionvoidintReturns the current auto-collapse setting.intReturns the current layout setting.intReturns whether overlay scrolling is enabled for the palette viewer .int[]Returns the layout modes that are supported.booleanisSupportedLayoutMode(int layout) This is a convenience method.voidvoidsetAutoCollapseSetting(int newVal) Sets the auto-collapse setting.voidsetCurrentUseLargeIcons(boolean newVal) Sets the "Use Large Icons" option for the currently active layout.voidsetFontData(FontData data) Sets the FontData for the palette.voidsetLayoutSetting(int newVal) Sets the given setting as the current layout.voidsetScrollbarsMode(int mode) Enables or disables overlay scrolling for the palette viewer.voidsetSupportedLayoutModes(int[] modes) The client can restrict the modes that the palette supports using this method.voidsetUseLargeIcons(int layout, boolean newVal) Sets the "Use Large Icons" option for the given layout.booleanbooleanuseLargeIcons(int layout) Indicated whether large icons should be used with the given layout mode.
- 
Field Details- 
COLLAPSE_ALWAYSstatic final int COLLAPSE_ALWAYSThis is a constant for one of the auto-collapse options.
 Indicates that containers should always auto-collapse.- See Also:
 
- 
COLLAPSE_NEVERstatic final int COLLAPSE_NEVERThis is a constant for one of the auto-collapse options.
 Indicates that containers should never auto-collapse.- See Also:
 
- 
COLLAPSE_AS_NEEDEDstatic final int COLLAPSE_AS_NEEDEDThis is a constant for one of the auto-collapse options.
 Indicates that containers should auto-collapse only when there is not enough room on the palette. This is the default auto-collapse setting.- See Also:
 
- 
LAYOUT_COLUMNSstatic final int LAYOUT_COLUMNSThis is a constant for one of the layout options.
 Indicates that the palette should be displayed in the columns mode.- See Also:
 
- 
LAYOUT_FOLDERstatic final int LAYOUT_FOLDERDeprecated.Use LAYOUT_COLUMNS instead.- See Also:
 
- 
LAYOUT_LISTstatic final int LAYOUT_LISTThis is a constant for one of the layout options.
 Indicates that the palette should be displayed in the list mode. This is the default layout setting.- See Also:
 
- 
LAYOUT_ICONSstatic final int LAYOUT_ICONSThis is a constant for one of the layout options.
 Indicates that the palette should be displayed in the icons only mode.- See Also:
 
- 
LAYOUT_DETAILSstatic final int LAYOUT_DETAILSThis is a constant for one of the layout options.
 Indicates that the palette should be displayed in the details mode.- See Also:
 
- 
PREFERENCE_LAYOUTProperty name for the layout setting. If the PropertyChangeEvent fired has this property name, it means that the layout setting was changed.- See Also:
 
- 
PREFERENCE_AUTO_COLLAPSEProperty name for the auto-collapse setting. If the PropertyChangeEvent fired has this property name, it means that the auto-collapse setting was changed.- See Also:
 
- 
PREFERENCE_COLUMNS_ICON_SIZEProperty name for the large icon setting for columns layout. If the PropertyChangeEvent fired has this property name, it means that the large icon setting was changed for columns layout. Large icons are default.- See Also:
 
- 
PREFERENCE_FOLDER_ICON_SIZEDeprecated.Use PREFERENCE_COLUMNS_ICON_SIZE instead.- See Also:
 
- 
PREFERENCE_LIST_ICON_SIZEProperty name for the large icon setting for list layout. If the PropertyChangeEvent fired has this property name, it means that the large icon setting was changed for list layout. Small icons are default.- See Also:
 
- 
PREFERENCE_ICONS_ICON_SIZEProperty name for the large icon setting for icons only layout. If the PropertyChangeEvent fired has this property name, it means that the large icon setting was changed for icons only layout. Large icons are default.- See Also:
 
- 
PREFERENCE_DETAILS_ICON_SIZEProperty name for the large icon setting for details layout. If the PropertyChangeEvent fired has this property name, it means that the large icon setting was changed for details layout. Small icons are default.- See Also:
 
- 
PREFERENCE_FONTProperty name for the palette font setting. If the PropertyChangeEvent fired has this property name, it means that the palette font was changed.- See Also:
 
- 
PREFERENCE_SCROLLBARS_MODELinux Only Property name for enabling or disabling the scrollbars overlay.- Since:
- 3.20
- See Also:
 
 
- 
- 
Method Details- 
addPropertyChangeListener- Parameters:
- listener- the PropertyChangeListener to be notified of changes
- See Also:
 
- 
getAutoCollapseSettingint getAutoCollapseSetting()Returns the current auto-collapse setting.Possible values returned: - COLLAPSE_ALWAYS (Always collapse)
- COLLAPSE_AS_NEEDED (Collapse when needed)
- COLLAPSE_NEVER (Never collapse)
 - Returns:
- One of the above-mentioned constants
 
- 
getFontDataFontData getFontData()- Returns:
- The FontData for the font to be used in the palette.
 
- 
getLayoutSettingint getLayoutSetting()Returns the current layout setting.Possible values returned: - LAYOUT_COLUMNS (columns View)
- LAYOUT_LIST (List View)
- LAYOUT_ICONS (Icons Only View)
- LAYOUT_DETAILS (Details View)
 - Returns:
- One of the above-mentioned constants
 
- 
getSupportedLayoutModesint[] getSupportedLayoutModes()Returns the layout modes that are supported. All four layout modes -- LAYOUT_COLUMNS, LAYOUT_LIST, LAYOUT_ICONS, LAYOUT_DETAILS -- are supported by default.- Returns:
- The layout modes that are supported
- See Also:
 
- 
isSupportedLayoutModeboolean isSupportedLayoutMode(int layout) This is a convenience method. Instead of getting the supported layout modes and checking to see if a certain layout is supported, you can call this method.- Parameters:
- layout- LAYOUT_COLUMNS, LAYOUT_LIST, LAYOUT_ICONS, or LAYOUT_DETAILS
- Returns:
- trueif the given layout is a supported mode
 
- 
removePropertyChangeListener- Parameters:
- listener- the PropertyChangeListener that should not be notified hereafter
- See Also:
 
- 
setAutoCollapseSettingvoid setAutoCollapseSetting(int newVal) Sets the auto-collapse setting.Possible values: - COLLAPSE_ALWAYS (Always collapse)
- COLLAPSE_AS_NEEDED (Collapse when needed)
- COLLAPSE_NEVER (Never collapse)
 - Parameters:
- newVal- One of the above-mentioned constants
 
- 
setFontDataSets the FontData for the palette.- Parameters:
- data- The FontData for the font to be used in the palette
 
- 
setLayoutSettingvoid setLayoutSetting(int newVal) Sets the given setting as the current layout.Possible values: - LAYOUT_COLUMNS (Columns View)
- LAYOUT_LIST (List View)
- LAYOUT_ICONS (Icons Only View)
- LAYOUT_DETAILS (Details View)
 - Parameters:
- newVal- One of the above-mentioned constants
 
- 
setCurrentUseLargeIconsvoid setCurrentUseLargeIcons(boolean newVal) Sets the "Use Large Icons" option for the currently active layout.- Parameters:
- newVal-- trueif large icons are to be used with the current layout setting
 
- 
setSupportedLayoutModesvoid setSupportedLayoutModes(int[] modes) The client can restrict the modes that the palette supports using this method. By default, the palette will support all layout modes: LAYOUT_ICONS, LAYOUT_DETAILS, LAYOUT_COLUMNS, LAYOUT_LIST. Should the client wish to not support all these modes, they can call this method with an array of the desired modes. This method should be called during set-up as soon as the preferences are created, and not later.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. - Parameters:
- modes- an array of layout modes desired
 
- 
setUseLargeIconsvoid setUseLargeIcons(int layout, boolean newVal) Sets the "Use Large Icons" option for the given layout.
 The defaults are as follows:- LAYOUT_COLUMNS - true
- LAYOUT_LIST - false
- LAYOUT_ICONS - true
- LAYOUT_DETAILS - false
 - Parameters:
- layout- any of the above-mentioned constants
- newVal-- trueif large icons are to be used with the given layout
 
- LAYOUT_COLUMNS - 
- 
useLargeIconsboolean useLargeIcons(int layout) Indicated whether large icons should be used with the given layout mode.
 The defaults are as follows:- LAYOUT_COLUMNS - true
- LAYOUT_LIST - false
- LAYOUT_ICONS - true
- LAYOUT_DETAILS - false
 - Parameters:
- layout- any of the above-mentioned constants
- Returns:
- trueif large icons are to be used with the given layout
 
- LAYOUT_COLUMNS - 
- 
useLargeIconsboolean useLargeIcons()- Returns:
- trueif large icons are to be used with the currently active layout
 
- 
setScrollbarsModevoid setScrollbarsMode(int mode) Enables or disables overlay scrolling for the palette viewer. Supported values are: Overlay scrollbars are only supported onLinux.- Since:
- 3.20
 
- 
getScrollbarsModeint getScrollbarsMode()Returns whether overlay scrolling is enabled for the palette viewer . Overlay scrollbars are only supported onLinux.- Returns:
- One of SWT.SCROLLBAR_OVERLAYorSWT.NONE.
- Since:
- 3.20
 
 
-