|
Runtime | ||||||||||
| 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.gmf.runtime.common.ui.dialogs.ShowRelatedElementsDialog
Show related elements dialog box, called from an action. When OK is clicked, returns Window.OK and result of the dialog is saved. When Cancel is clicked, returns Window.Cancel and result of dialog is not saved. This dialog does not include a listbox for models.
| Nested Class Summary |
| Nested classes inherited from class org.eclipse.jface.window.Window |
Window.IExceptionHandler |
| Field Summary | |
protected Composite |
body
Composite body that contains the interesting controls. |
protected int |
cachedExpandLevels
Cached levels of expansion -1 for indefinite. |
protected int |
cachedExpansionType
Cached expansion types. |
protected java.util.List |
cachedRelationshipTypes
Cached relationship types. |
protected boolean |
detailsShown
True if the details pane is shown, false if hidden |
protected static java.lang.String |
DIALOG_SETTINGS_KEY
Dialog settings key True if the details pane is shown, false if hidden |
static int |
MAX_VIEWER_WIDTH
Tree viewer control's width for the hint |
protected Composite |
placeholderForShowRelatedElementsComposite
Predefined composite placeholder. |
protected int |
preferredViewerWidth
Preferred viewer width, cached |
protected java.util.List |
queriesList
List of queries. |
protected ShowRelatedElementsPredefinedComposite |
showRelatedElementsPredefinedComposite
Predefined composite. |
| Fields inherited from class org.eclipse.jface.dialogs.Dialog |
blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, DLG_IMG_ERROR, DLG_IMG_HELP, 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 | |
ShowRelatedElementsDialog(Shell parentShell,
SelectableElement aRootElement)
Constructor takes the parent shell and root SelectableElement to add into the viewer. |
|
ShowRelatedElementsDialog(Shell parentShell,
SelectableElement aRootElement,
java.util.List aQueriesList)
Constructor takes the parent shell and root SelectableElement to add into the viewer. |
|
| Method Summary | |
protected void |
cancelPressed()
Cancel button click handler Dialog is not closed if validation fails. |
boolean |
close()
Save settings before close |
protected Control |
createContents(Composite parent)
Create contents and give focus to the OK button |
protected Control |
createDialogArea(Composite parent)
Make the composites in the dialog |
void |
detailsChanged()
Notify the composite the details were changed |
boolean |
getConsumerToSelection()
Returns if the selection to consumer radio or both radio was selected This will be deprecated when all SRE implementors implement the all connected option. |
ShowRelatedElementsPreset |
getCurrentSettings()
Return the current preset settings |
boolean |
getExpandIndefinitely()
Returns if the expand indefinitely box was checked, even if it is disposed. |
int |
getExpandLevels()
Returns the int value in the expand levels box, even if it is disposed and even if the user did not enter an int. |
ExpansionType |
getExpansionType()
Returns the expansion type |
protected ShowRelatedElementsPredefinedComposite |
getPredefinedComposite()
Return the predefined composite. |
protected int |
getPreferredViewerWidth()
Cache the preferred viewer width after figuring it out from the longest string length of the root element. |
SelectableElement |
getRootElement()
Returns the root element of the RelatedElements that were in the viewer control at the left of the dialog. |
java.util.List |
getSelectedRelationshipTypes()
Returns list of selected RelationshipTypes. |
boolean |
getSelectionToSupplier()
Returns if the selection to supplier radio or both radio was selected This will be deprecated when all SRE implementors implement the all connected option. |
ShowRelatedElementsComposite |
getShowRelatedElementsComposite()
Method getShowRelatedElementsComposite. |
protected void |
initDialogSettings()
Read in dialog settings and update based on that. |
void |
initHelpContextId(java.lang.String helpId)
Initialize the context sensitive help id. |
protected ShowRelatedElementsPredefinedComposite |
makePredefinedComposite(Composite parent,
SelectableElement root,
java.util.List queries,
int viewerWidth)
Make the predefined composite |
protected ShowRelatedElementsComposite |
makeShowRelatedElementsComposite(Composite parent,
SelectableElement root,
int aViewerWidth)
Make the show related elements composite |
protected ShowRelatedElementsComposite |
makeShowRelatedElementsCompositeInPlaceholder(Composite parent,
SelectableElement root)
Suggested that you override makeShowRelatedElementsComposite instead, unless you have a good reason for overriding the plcaeholder composite too. |
protected void |
okPressed()
OK button click handler. |
protected void |
saveCachedValues()
Save the cached values of the composite in our own cache. |
protected void |
saveDialogSettings()
Store the dialog settings from our current dialog. |
void |
showOrHideDetails()
Toggle showing or hiding details. |
void |
updateRelationships(ShowRelatedElementsPreset preset)
Update relationshpips according to the preset |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected boolean detailsShown
protected static final java.lang.String DIALOG_SETTINGS_KEY
protected java.util.List queriesList
protected int cachedExpandLevels
protected int cachedExpansionType
protected java.util.List cachedRelationshipTypes
protected Composite placeholderForShowRelatedElementsComposite
protected ShowRelatedElementsPredefinedComposite showRelatedElementsPredefinedComposite
protected Composite body
protected int preferredViewerWidth
public static int MAX_VIEWER_WIDTH
| Constructor Detail |
public ShowRelatedElementsDialog(Shell parentShell,
SelectableElement aRootElement)
parentShell - the parent ShellaRootElement - the root SelectableElement to add into the viewer
public ShowRelatedElementsDialog(Shell parentShell,
SelectableElement aRootElement,
java.util.List aQueriesList)
parentShell - the parent ShellaRootElement - the root SelectableElement to add into the vieweraQueriesList - list of hardcoded queries| Method Detail |
protected ShowRelatedElementsPredefinedComposite makePredefinedComposite(Composite parent,
SelectableElement root,
java.util.List queries,
int viewerWidth)
parent - parent Compositeroot - root SelectableElementqueries - saved queries ListviewerWidth - desired width of listbox viewer
protected int getPreferredViewerWidth()
protected ShowRelatedElementsComposite makeShowRelatedElementsCompositeInPlaceholder(Composite parent,
SelectableElement root)
parent - the parent Composite that we will be adding the placeholder
intoroot - root SelectableElement
protected ShowRelatedElementsComposite makeShowRelatedElementsComposite(Composite parent,
SelectableElement root,
int aViewerWidth)
parent - parent Composite we will be adding into.root - root SelectableElementaViewerWidth - int hint for viewer width
protected Control createDialogArea(Composite parent)
parent - the parent Composite
protected Control createContents(Composite parent)
parent - the parent Composite
protected void okPressed()
protected void cancelPressed()
public boolean getExpandIndefinitely()
public int getExpandLevels()
public boolean getConsumerToSelection()
public boolean getSelectionToSupplier()
public ExpansionType getExpansionType()
public java.util.List getSelectedRelationshipTypes()
public SelectableElement getRootElement()
public ShowRelatedElementsComposite getShowRelatedElementsComposite()
public void initHelpContextId(java.lang.String helpId)
helpId - the help context id stringprotected void saveCachedValues()
public void showOrHideDetails()
showOrHideDetails in interface IShowRelatedElementsWithDetailspublic void updateRelationships(ShowRelatedElementsPreset preset)
updateRelationships in interface IShowRelatedElementsWithDetailspreset - ShowRelatedElementsPreset containing new relationhips.public ShowRelatedElementsPreset getCurrentSettings()
getCurrentSettings in interface IShowRelatedElementsWithDetailspublic void detailsChanged()
detailsChanged in interface IShowRelatedElementsWithDetailsprotected ShowRelatedElementsPredefinedComposite getPredefinedComposite()
protected void initDialogSettings()
protected void saveDialogSettings()
public boolean close()
|
Runtime | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.