|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jface.window.Window
org.eclipse.jface.dialogs.Dialog
org.eclipse.gef.ui.palette.customize.PaletteSettingsDialog
Nested Class Summary |
Nested classes inherited from class org.eclipse.jface.window.Window |
org.eclipse.jface.window.Window.IExceptionHandler |
Field Summary | |
protected static int |
APPLY_ID
The unique IDs for the various widgets. |
protected static java.lang.String |
CACHE_COLLAPSE
HashMap keys used for caching the various settings displayed in this dialog. |
protected static java.lang.String |
CACHE_COLUMNS_ICON_SIZE
HashMap keys used for caching the various settings displayed in this dialog. |
protected static java.lang.String |
CACHE_DETAILS_ICON_SIZE
HashMap keys used for caching the various settings displayed in this dialog. |
protected static java.lang.String |
CACHE_FONT
HashMap keys used for caching the various settings displayed in this dialog. |
protected static java.lang.String |
CACHE_ICONS_ICON_SIZE
HashMap keys used for caching the various settings displayed in this dialog. |
protected static java.lang.String |
CACHE_LAYOUT
HashMap keys used for caching the various settings displayed in this dialog. |
protected static java.lang.String |
CACHE_LIST_ICON_SIZE
HashMap keys used for caching the various settings displayed in this dialog. |
protected static int |
CLIENT_ID
Sub - classes that need to create their own unique IDs should do so by adding to this ID. |
protected static int |
COLLAPSE_ALWAYS_ID
The unique IDs for the various widgets. |
protected static int |
COLLAPSE_NEEDED_ID
The unique IDs for the various widgets. |
protected static int |
COLLAPSE_NEVER_ID
The unique IDs for the various widgets. |
protected static int |
DEFAULT_FONT_ID
The unique IDs for the various widgets. |
protected static int |
FONT_CHANGE_ID
The unique IDs for the various widgets. |
protected static int |
LAYOUT_COLUMNS_ICON_SIZE_ID
The unique IDs for the various widgets. |
protected static int |
LAYOUT_COLUMNS_VIEW_ID
The unique IDs for the various widgets. |
protected static int |
LAYOUT_DETAILS_ICON_SIZE_ID
The unique IDs for the various widgets. |
protected static int |
LAYOUT_DETAILS_VIEW_ID
The unique IDs for the various widgets. |
protected static int |
LAYOUT_ICONS_ICON_SIZE_ID
The unique IDs for the various widgets. |
protected static int |
LAYOUT_ICONS_VIEW_ID
The unique IDs for the various widgets. |
protected static int |
LAYOUT_LIST_ICON_SIZE_ID
The unique IDs for the various widgets. |
protected static int |
LAYOUT_LIST_VIEW_ID
The unique IDs for the various widgets. |
protected java.util.HashMap |
settings
A HashMap to cache the various settings displayed in this dialog |
Fields inherited from class org.eclipse.jface.dialogs.Dialog |
blockedHandler, buttonBar, dialogArea, DLG_IMG_ERROR, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSIS |
Fields inherited from class org.eclipse.jface.window.Window |
CANCEL, OK |
Constructor Summary | |
PaletteSettingsDialog(org.eclipse.swt.widgets.Shell parentShell,
PaletteViewerPreferences prefs)
Constructor |
Method Summary | |
protected void |
buttonPressed(int buttonId)
This method will be invoked whenever any Button created using
createButton(Composite, int, String, int, ImageDescriptor) or
Dialog.createButton(Composite, int, String, boolean) is selected. |
protected void |
cacheSettings()
This method saves the various settings in this dialog, so that they can be restored later on if "Cancel" is pressed. |
boolean |
close()
|
protected void |
configureShell(org.eclipse.swt.widgets.Shell newShell)
|
protected org.eclipse.swt.widgets.Button |
createButton(org.eclipse.swt.widgets.Composite parent,
int id,
java.lang.String label,
int stylebits,
org.eclipse.jface.resource.ImageDescriptor descriptor)
This method should not be used to create buttons for the button bar. |
protected org.eclipse.swt.widgets.Control |
createColumnsOptions(org.eclipse.swt.widgets.Composite parent)
Creates and initializes (i.e. |
protected org.eclipse.swt.widgets.Control |
createDetailsOptions(org.eclipse.swt.widgets.Composite parent)
Creates and initializes (i.e. |
protected org.eclipse.swt.widgets.Control |
createDialogArea(org.eclipse.swt.widgets.Composite parent)
|
protected org.eclipse.swt.widgets.Control |
createDrawerCollapseOptions(org.eclipse.swt.widgets.Composite container)
Creates and initializes (i.e., loads the current value from the PaletteViewerPreferences) the part of the dialog where the options to close drawers will be displayed. |
protected org.eclipse.swt.widgets.Control |
createFontSettings(org.eclipse.swt.widgets.Composite parent)
Creates and initializes (i.e. |
protected org.eclipse.swt.widgets.Control |
createIconsOnlyOptions(org.eclipse.swt.widgets.Composite parent)
Creates and initializes (i.e. |
protected org.eclipse.swt.widgets.Control |
createLayoutOptions(org.eclipse.swt.widgets.Composite parent)
Creates the part of the dialog that displays the various options for the selected layout. |
protected org.eclipse.swt.widgets.Control |
createLayoutSettings(org.eclipse.swt.widgets.Composite parent)
Creates the part of the dialog that displays the lists the available layout modes. |
protected org.eclipse.swt.widgets.Control |
createListOptions(org.eclipse.swt.widgets.Composite parent)
Creates and initializes (i.e. |
protected org.eclipse.swt.widgets.Control |
createOptionsPage(org.eclipse.swt.widgets.Composite parent,
java.lang.String title,
int buttonId)
This helper method is a result of code-factoring. |
protected org.eclipse.swt.widgets.Button |
getButton(int id)
Returns the Button with the given id; or null if none was found. |
protected org.eclipse.swt.widgets.Widget |
getWidget(int id)
The Widget s that were created with a unique ID and added to this class'
internal map can be retrieved through this method. |
protected void |
handleAutoCollapseSettingChanged(int newSetting)
Called when any one of the "Auto - Collapse" radio buttons is clicked. |
protected void |
handleCancelPressed()
This method is invoked when "Cancel" is invoked on the dialog. |
protected void |
handleChangeFontPressed()
This method is invoked when the user selects the "Change" font button. |
protected void |
handleDefaultFontRequested()
This method is invoked when the user selects the "Restore Default" font button. |
protected void |
handleIconSizeChanged(boolean selection)
This method is invoked when the "Use Large Icons" checkbox is selected/deselected for the currently active layout mode. |
protected void |
handleLayoutSettingChanged(int newSetting)
This method is called when any one of the "Layout" radio buttons is clicked. |
protected void |
restoreSettings()
Restores the cached settings, thus undoing any changes made since the last caching of settings. |
protected void |
showLayoutOptionsPage(org.eclipse.swt.widgets.Control page)
This helper method is mainly a result of code-factoring. |
protected void |
updateFontName()
Updates the label showing the font's name to show the name of the current font. |
Methods inherited from class org.eclipse.jface.dialogs.Dialog |
applyDialogFont, cancelPressed, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, createButtonBar, createButtonsForButtonBar, createContents, dialogFontIsDefault, getBlockedHandler, getButtonBar, getCancelButton, getDialogArea, getImage, getOKButton, initializeBounds, initializeDialogUnits, okPressed, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText |
Methods inherited from class org.eclipse.jface.window.Window |
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getInitialLocation, getInitialSize, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setExceptionHandler, setReturnCode, setShellStyle, setWindowManager |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.HashMap settings
protected static final java.lang.String CACHE_LAYOUT
protected static final java.lang.String CACHE_COLUMNS_ICON_SIZE
protected static final java.lang.String CACHE_LIST_ICON_SIZE
protected static final java.lang.String CACHE_ICONS_ICON_SIZE
protected static final java.lang.String CACHE_DETAILS_ICON_SIZE
protected static final java.lang.String CACHE_FONT
protected static final java.lang.String CACHE_COLLAPSE
protected static final int LAYOUT_COLUMNS_VIEW_ID
getWidget(int)
), or to identify
widgets in buttonPressed(int)
.
protected static final int LAYOUT_LIST_VIEW_ID
getWidget(int)
), or to identify
widgets in buttonPressed(int)
.
protected static final int LAYOUT_ICONS_VIEW_ID
getWidget(int)
), or to identify
widgets in buttonPressed(int)
.
protected static final int LAYOUT_COLUMNS_ICON_SIZE_ID
getWidget(int)
), or to identify
widgets in buttonPressed(int)
.
protected static final int LAYOUT_LIST_ICON_SIZE_ID
getWidget(int)
), or to identify
widgets in buttonPressed(int)
.
protected static final int LAYOUT_ICONS_ICON_SIZE_ID
getWidget(int)
), or to identify
widgets in buttonPressed(int)
.
protected static final int LAYOUT_DETAILS_ICON_SIZE_ID
getWidget(int)
), or to identify
widgets in buttonPressed(int)
.
protected static final int COLLAPSE_NEVER_ID
getWidget(int)
), or to identify
widgets in buttonPressed(int)
.
protected static final int COLLAPSE_ALWAYS_ID
getWidget(int)
), or to identify
widgets in buttonPressed(int)
.
protected static final int COLLAPSE_NEEDED_ID
getWidget(int)
), or to identify
widgets in buttonPressed(int)
.
protected static final int APPLY_ID
getWidget(int)
), or to identify
widgets in buttonPressed(int)
.
protected static final int LAYOUT_DETAILS_VIEW_ID
getWidget(int)
), or to identify
widgets in buttonPressed(int)
.
protected static final int FONT_CHANGE_ID
getWidget(int)
), or to identify
widgets in buttonPressed(int)
.
protected static final int DEFAULT_FONT_ID
getWidget(int)
), or to identify
widgets in buttonPressed(int)
.
protected static final int CLIENT_ID
Constructor Detail |
public PaletteSettingsDialog(org.eclipse.swt.widgets.Shell parentShell, PaletteViewerPreferences prefs)
parentShell
- The parent shell, or null
to create a top - level
shellprefs
- The PaletteViewerPreferences object that can provide access to
and allow modification of the palette's settings. It cannot be
null
.Method Detail |
protected void buttonPressed(int buttonId)
Button
created using
createButton(Composite, int, String, int, ImageDescriptor)
or
Dialog.createButton(Composite, int, String, boolean)
is selected.
Dialog.buttonPressed(int)
protected void cacheSettings()
restoreSettings()
public boolean close()
Window.close()
protected void configureShell(org.eclipse.swt.widgets.Shell newShell)
Window.configureShell(Shell)
protected org.eclipse.swt.widgets.Button createButton(org.eclipse.swt.widgets.Composite parent, int id, java.lang.String label, int stylebits, org.eclipse.jface.resource.ImageDescriptor descriptor)
Dialog.createButton(Composite, int, String, boolean)
for that. This method
can be used to create any other button in the dialog. The parent
Composite
must have a GridLayout. These buttons will be available
through getButton(int)
and getWidget(int)
. Ensure that the various
buttons created by this method are given unique IDs. Pass in a null image descriptor
if you don't want the button to have an icon. This method will take care of
disposing the images that it creates. buttonPressed(int)
will be called when
any of the buttons created by this method are clicked (selected).
parent
- The composite in which the button is to be createdid
- The button's unique IDlabel
- The button's textstylebits
- The style bits for creating the button (eg.,
SWT.PUSH
SWT.CHECK)descriptor
- The ImageDescriptor from which the image/icon for this
button should be created
protected org.eclipse.swt.widgets.Control createDrawerCollapseOptions(org.eclipse.swt.widgets.Composite container)
container
- The parent composite
protected org.eclipse.swt.widgets.Control createDetailsOptions(org.eclipse.swt.widgets.Composite parent)
parent
- the parent composite
protected org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent)
Dialog.createDialogArea(Composite)
protected org.eclipse.swt.widgets.Control createColumnsOptions(org.eclipse.swt.widgets.Composite parent)
parent
- the parent composite
protected org.eclipse.swt.widgets.Control createFontSettings(org.eclipse.swt.widgets.Composite parent)
parent
- the parent composite
protected org.eclipse.swt.widgets.Control createIconsOnlyOptions(org.eclipse.swt.widgets.Composite parent)
parent
- the parent composite
protected org.eclipse.swt.widgets.Control createLayoutOptions(org.eclipse.swt.widgets.Composite parent)
parent
- the parent composite
protected org.eclipse.swt.widgets.Control createLayoutSettings(org.eclipse.swt.widgets.Composite parent)
parent
- the parent composite
protected org.eclipse.swt.widgets.Control createListOptions(org.eclipse.swt.widgets.Composite parent)
parent
- the parent composite
protected org.eclipse.swt.widgets.Control createOptionsPage(org.eclipse.swt.widgets.Composite parent, java.lang.String title, int buttonId)
parent
- the parent compositetitle
- The title for the group to be created.buttonId
- The ID for the "Use Large Icons" checkbox to be created in the
group.
protected org.eclipse.swt.widgets.Button getButton(int id)
null
if none was found.
Dialog.getButton(int)
protected org.eclipse.swt.widgets.Widget getWidget(int id)
Widget
s that were created with a unique ID and added to this class'
internal map can be retrieved through this method.
id
- The unique ID of the Widget that you wish to retrieve
null
otherwise.protected void handleAutoCollapseSettingChanged(int newSetting)
PaletteViewerPreferences
object.
newSetting
- The flag for the new settingprotected void handleCancelPressed()
protected void handleChangeFontPressed()
protected void handleDefaultFontRequested()
protected void handleIconSizeChanged(boolean selection)
selection
- indicates whether large icons are to be used or not.protected void handleLayoutSettingChanged(int newSetting)
PaletteViewerPreferences
object.
newSetting
- The flag for the new settingprotected void restoreSettings()
cacheSettings()
protected void showLayoutOptionsPage(org.eclipse.swt.widgets.Control page)
page
- One of the controls showing the layout options that already belongs to
the PageBook book.protected void updateFontName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |