|
||||||||||
| 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
net.sourceforge.rssowl.controller.dialog.SelectCategoryDialog
public class SelectCategoryDialog
This dialog is used to select a category from a tree that is displaying all categories, without blogrolls in case the Dialog is not readonly.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.eclipse.jface.window.Window |
|---|
org.eclipse.jface.window.Window.IExceptionHandler |
| Field Summary | |
|---|---|
(package private) Tree |
categoryTree
|
private java.lang.String |
catPath
|
private static Rectangle |
dialogShellSize
Bounds of the shell in DLUs |
private boolean |
readonly
|
(package private) TreeItem |
rootItem
|
private java.lang.String |
title
|
| 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 | |
|---|---|
SelectCategoryDialog(Shell parentShell,
java.lang.String dialogTitle)
Creates an dialog with a tree filled with all categories. |
|
| Method Summary | |
|---|---|
(package private) void |
buildCatTree()
Recursivly write all categorys and subcategories to the tree |
private void |
buildCatTree(TreeItem parent,
Category cat)
Recursivly write all categorys and subcategories to the tree |
protected void |
buttonPressed(int buttonId)
|
protected void |
configureShell(Shell shell)
|
protected void |
createButtonsForButtonBar(Composite parent)
|
protected Control |
createDialogArea(Composite parent)
|
(package private) void |
createNewCategory()
Opens the New Category dialog and prompts for a name of the new category. |
protected Button |
getButton(int id)
|
java.lang.String |
getCatPath()
Get the selected category as String path |
private java.lang.String |
getCatPath(TreeItem treeItem)
Get the category path beginning with the given treeitem. |
private Image |
getImage(Category category)
Get the Image for the given Category. |
protected Point |
getInitialSize()
|
(package private) Category |
getSelectedCategory()
Get the associated Category model object for the selection in the category tree or the root category if no selection was made or the tree is empty |
protected int |
getShellStyle()
|
protected void |
initializeBounds()
|
(package private) void |
onSelection()
Called upon selection change in the Category Tree. |
private void |
selectCategory(java.lang.String catPath)
Selects the given Category in the Tree. |
protected void |
setButtonLayoutData(Button button)
Set the layout data of the button to a GridData with appropriate widths This method was slightly modified so that it is not setting a heightHint. |
void |
setCatPath(java.lang.String catPath)
Sets the input category as String path |
void |
setReadonly(boolean readonly)
If this flag is set to TRUE, it is not possible to create new categories from the Dialog. |
| Methods inherited from class org.eclipse.jface.dialogs.Dialog |
|---|
applyDialogFont, cancelPressed, close, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, createButtonBar, createContents, dialogFontIsDefault, getBlockedHandler, getButtonBar, getCancelButton, getDialogArea, getImage, getOKButton, initializeDialogUnits, okPressed, setBlockedHandler, setButtonLayoutFormData, shortenText |
| Methods inherited from class org.eclipse.jface.window.Window |
|---|
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getInitialLocation, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getWindowManager, handleFontChange, handleShellCloseEvent, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final Rectangle dialogShellSize
private java.lang.String catPath
private boolean readonly
private java.lang.String title
Tree categoryTree
TreeItem rootItem
| Constructor Detail |
|---|
public SelectCategoryDialog(Shell parentShell,
java.lang.String dialogTitle)
Note that the open method blocks for input dialogs.
parentShell - the parent shelldialogTitle - the dialog title, or null if none| Method Detail |
|---|
public java.lang.String getCatPath()
public void setCatPath(java.lang.String catPath)
catPath - The input category as category String path.public void setReadonly(boolean readonly)
readonly - Set to TRUE, if it should not be allowed to create new
categories from the Dialog.
private void buildCatTree(TreeItem parent,
Category cat)
parent - The parent treeitemcat - Current Categoryprivate java.lang.String getCatPath(TreeItem treeItem)
treeItem - The entry point for the category path String
private Image getImage(Category category)
category - The Category to get an Image for.
private void selectCategory(java.lang.String catPath)
catPath - The Path to the Category to select.protected void buttonPressed(int buttonId)
buttonPressed in class org.eclipse.jface.dialogs.DialogDialog.buttonPressed(int)protected void configureShell(Shell shell)
configureShell in class org.eclipse.jface.window.WindowWindow.configureShell(org.eclipse.swt.widgets.Shell)protected void createButtonsForButtonBar(Composite parent)
createButtonsForButtonBar in class org.eclipse.jface.dialogs.DialogDialog.createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)protected Control createDialogArea(Composite parent)
createDialogArea in class org.eclipse.jface.dialogs.DialogDialog.createDialogArea(org.eclipse.swt.widgets.Composite)protected Button getButton(int id)
getButton in class org.eclipse.jface.dialogs.DialogDialog.getButton(int)protected Point getInitialSize()
getInitialSize in class org.eclipse.jface.window.WindowWindow.getInitialSize()protected int getShellStyle()
getShellStyle in class org.eclipse.jface.window.WindowWindow.getShellStyle()protected void initializeBounds()
initializeBounds in class org.eclipse.jface.dialogs.DialogWindow.initializeBounds()protected void setButtonLayoutData(Button button)
setButtonLayoutData in class org.eclipse.jface.dialogs.Dialogbutton - The button to layoutvoid buildCatTree()
void createNewCategory()
Category getSelectedCategory()
void onSelection()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||