Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse GEF
3.3

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.


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 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.
 
Method Summary
 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.
 

Field Detail

COLLAPSE_ALWAYS

public static final int COLLAPSE_ALWAYS
This is a constant for one of the auto-collapse options.
Indicates that containers should always auto-collapse.

See Also:
Constant Field Values

COLLAPSE_NEVER

public static final int COLLAPSE_NEVER
This is a constant for one of the auto-collapse options.
Indicates that containers should never auto-collapse.

See Also:
Constant Field Values

COLLAPSE_AS_NEEDED

public static final int COLLAPSE_AS_NEEDED
This 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:
Constant Field Values

LAYOUT_COLUMNS

public static final int LAYOUT_COLUMNS
This is a constant for one of the layout options.
Indicates that the palette should be displayed in the columns mode.

See Also:
Constant Field Values

LAYOUT_FOLDER

public static final int LAYOUT_FOLDER
Deprecated. Use LAYOUT_COLUMNS instead.

See Also:
Constant Field Values

LAYOUT_LIST

public static final int LAYOUT_LIST
This 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:
Constant Field Values

LAYOUT_ICONS

public static final int LAYOUT_ICONS
This is a constant for one of the layout options.
Indicates that the palette should be displayed in the icons only mode.

See Also:
Constant Field Values

LAYOUT_DETAILS

public static final int LAYOUT_DETAILS
This is a constant for one of the layout options.
Indicates that the palette should be displayed in the details mode.

See Also:
Constant Field Values

PREFERENCE_LAYOUT

public static final java.lang.String PREFERENCE_LAYOUT
Property name for the layout setting. If the PropertyChangeEvent fired has this property name, it means that the layout setting was changed.

See Also:
Constant Field Values

PREFERENCE_AUTO_COLLAPSE

public static final java.lang.String PREFERENCE_AUTO_COLLAPSE
Property 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:
Constant Field Values

PREFERENCE_COLUMNS_ICON_SIZE

public static final java.lang.String PREFERENCE_COLUMNS_ICON_SIZE
Property 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:
Constant Field Values

PREFERENCE_FOLDER_ICON_SIZE

public static final java.lang.String PREFERENCE_FOLDER_ICON_SIZE
Deprecated. Use PREFERENCE_COLUMNS_ICON_SIZE instead.

See Also:
Constant Field Values

PREFERENCE_LIST_ICON_SIZE

public static final java.lang.String PREFERENCE_LIST_ICON_SIZE
Property 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:
Constant Field Values

PREFERENCE_ICONS_ICON_SIZE

public static final java.lang.String PREFERENCE_ICONS_ICON_SIZE
Property 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:
Constant Field Values

PREFERENCE_DETAILS_ICON_SIZE

public static final java.lang.String PREFERENCE_DETAILS_ICON_SIZE
Property 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:
Constant Field Values

PREFERENCE_FONT

public static final java.lang.String PREFERENCE_FONT
Property name for the palette font setting. If the PropertyChangeEvent fired has this property name, it means that the palette font was changed.

See Also:
Constant Field Values
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Parameters:
listener - the PropertyChangeListener to be notified of changes
See Also:
PropertyChangeSupport.addPropertyChangeListener( java.beans.PropertyChangeListener)

getAutoCollapseSetting

public int 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

getFontData

public FontData getFontData()
Returns:
The FontData for the font to be used in the palette.

getLayoutSetting

public int 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

getSupportedLayoutModes

public int[] 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:
setSupportedLayoutModes(int[])

isSupportedLayoutMode

public boolean 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:
true if the given layout is a supported mode

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Parameters:
listener - the PropertyChangeListener that should not be notified hereafter
See Also:
PropertyChangeSupport.removePropertyChangeListener( java.beans.PropertyChangeListener)

setAutoCollapseSetting

public void 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

setFontData

public void setFontData(FontData data)
Sets the FontData for the palette.

Parameters:
data - The FontData for the font to be used in the palette

setLayoutSetting

public void 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

setCurrentUseLargeIcons

public void setCurrentUseLargeIcons(boolean newVal)
Sets the "Use Large Icons" option for the currently active layout.

Parameters:
newVal - true if large icons are to be used with the current layout setting

setSupportedLayoutModes

public void 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

setUseLargeIcons

public void 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 - true if large icons are to be used with the given layout

useLargeIcons

public boolean 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:
true if large icons are to be used with the given layout

useLargeIcons

public boolean useLargeIcons()
Returns:
true if large icons are to be used with the currently active layout

Eclipse GEF
3.3

Copyright (c) IBM Corp. and others 2000, 2007. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire