|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
org.ceryle.ui.graph.AssociationEditorDialog
public class AssociationEditorDialog
A singleton class extending JDialog, providing basic dialog features for an Association editor. This embeds an EditorLayoutPanel, a prototype graph. Note that the dialog is not automatically displayed upon instantiation.
| Nested Class Summary | |
|---|---|
protected class |
AssociationEditorDialog.ATPopup
Inner class handles role popup menus. |
class |
AssociationEditorDialog.DialogDisposer
|
protected class |
AssociationEditorDialog.PlayerPopup
Inner class handles player popup menus. |
protected class |
AssociationEditorDialog.RolePopup
Inner class handles role popup menus. |
| Nested classes/interfaces inherited from class javax.swing.JDialog |
|---|
JDialog.AccessibleJDialog |
| Nested classes/interfaces inherited from class java.awt.Dialog |
|---|
Dialog.AccessibleAWTDialog |
| Nested classes/interfaces inherited from class java.awt.Window |
|---|
Window.AccessibleAWTWindow |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static int |
ASSOC_DIR_FORWARD
Indicates a forwardly-directed Association. |
static int |
ASSOC_DIR_NONE
Indicates an undirected Association. |
static int |
ASSOC_DIR_REFLEXIVE
Indicates a reflexive Association. |
static int |
ASSOC_DIR_REVERSE
Indicates a reverse-directed Association. |
static String |
assocEditorHelpID
The ID in the Help collection for the Association Editor. |
protected JCheckBoxMenuItem |
btn_isTemplate
|
static int |
delay
The delay (in seconds) following which a call to backgroundCreate()
calls the singleton instantiation thread. |
static int |
HORIZ_SIZE
The default horizontal size of the dialog. |
static int |
VERT_SIZE
The default vertical size of the dialog. |
| Fields inherited from class javax.swing.JDialog |
|---|
accessibleContext, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.WindowConstants |
|---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Method Summary | |
|---|---|
static void |
backgroundCreate()
Uses a TimerTask to create an AssociationEditor a few seconds after being called, so that the initial display of the Graphview has time to stabilize before building the editor. |
protected void |
categorySelected(int category,
int clickcount)
Receives notification of a node selection in the embedded graph. |
void |
clear()
Clear all stored content. |
protected void |
closing()
|
protected JPanel |
createButtonPanel()
Returns the southernmost toolbar containing the buttons set and close buttons, as well as the toolbar buttons for manipulating topics, associations, and occurrences. |
boolean |
editAssociation(TMLayoutPanel tmlpanel,
ANode anode)
Sets the editing facilities for the provided ANode and its underlying Association. |
static AssociationEditorDialog |
getInstance()
As this is a singleton class, this returns the single instance of this class. |
protected void |
handlePopupMenuEvent(MouseEvent event,
int nodeID,
TMNode node)
Handles right-click MouseEvents on the EditorLayoutPanel by displaying a context-sensitive popup menu. |
boolean |
isEditable()
Returns true if the current association template is editable. |
boolean |
isInTransition()
Returns true if the AssociationEditorDialog is in transition between loading topics. |
protected void |
revertAssociation()
Revert the Association Editors's characteristics to the original graph/topic map. |
protected boolean |
saveAssociation()
Save this Association's characteristics to the current graph/topic map, returning true if the save was successful. |
void |
saveProperties()
Save any UI properties to the preferences file. |
Topic |
selectRole()
Responds to a selection from a dialog button to select a role Topic from a tree. |
void |
selectType()
Responds to a selection from the dialog button to select an Association typing Topic from a tree. |
protected void |
setAssociation(Association assoc,
Topic type,
boolean query)
Sets the Association and typing Topic value and displayed label according to either the Association assoc OR the Topic topic, with priority given the former. |
protected void |
setDirty(boolean state)
Sets the dirty state for this dialog. |
protected void |
setIsTemplate(boolean enabled,
boolean isTemplate,
boolean isEditable)
Sets the "is Association Template" checkbox to the parameter value isTemplate. |
protected void |
setTopic_PlayerLeft(Member member,
Topic player,
TNode tnode,
boolean query)
Sets the left Member, the player Topic value and displayed label according to the Topic topic. |
protected void |
setTopic_PlayerRight(Member member,
Topic player,
TNode tnode,
boolean query)
Sets the right Member, the player Topic value and displayed label according to the Topic topic. |
protected void |
setTopic_RoleLeft(Topic role,
boolean query)
Sets the left role Topic value and displayed label according to the Topic topic. |
protected void |
setTopic_RoleRight(Topic role,
boolean query)
Sets the right role Topic value and displayed label according to the Topic topic. |
void |
setVisible(boolean visible)
Overrides the superclass to finish up with graph animation prior to showing the dialog. |
boolean |
somethingHasChanged()
Returns true if anything has changed between the original Association and the current editor configuration. |
protected void |
somethingMayHaveChanged()
This compares the current configuration with the original set upon opening the dialog, and if changed, sets the dirty state true, otherwise sets it false. |
void |
updatePrototypeFont()
Notifies the EditorLayoutPanel that the base GraphNode font size has changed. |
boolean |
xEditAssociation(TMLayoutPanel tmlpanel,
ANode anode)
Sets the editing facilities for the provided ANode and its underlying Association. |
| Methods inherited from class java.awt.Dialog |
|---|
addNotify, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setResizable, setTitle, setUndecorated, show |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String assocEditorHelpID
public static final int ASSOC_DIR_NONE
public static final int ASSOC_DIR_FORWARD
public static final int ASSOC_DIR_REVERSE
public static final int ASSOC_DIR_REFLEXIVE
public static int HORIZ_SIZE
public static int VERT_SIZE
public static int delay
backgroundCreate()
calls the singleton instantiation thread. Default is 7 seconds.
protected JCheckBoxMenuItem btn_isTemplate
| Method Detail |
|---|
public static AssociationEditorDialog getInstance()
public static void backgroundCreate()
public void setVisible(boolean visible)
setVisible in class Componentpublic void clear()
public boolean editAssociation(TMLayoutPanel tmlpanel,
ANode anode)
public boolean xEditAssociation(TMLayoutPanel tmlpanel,
ANode anode)
protected void setIsTemplate(boolean enabled,
boolean isTemplate,
boolean isEditable)
public boolean isEditable()
protected void setAssociation(Association assoc,
Topic type,
boolean query)
If query is true, a dialog box will allow re-selection.
protected void setTopic_RoleLeft(Topic role,
boolean query)
If query is true, a dialog box will allow re-selection.
protected void setTopic_PlayerLeft(Member member,
Topic player,
TNode tnode,
boolean query)
If query is true, a dialog box will allow re-selection.
protected void setTopic_RoleRight(Topic role,
boolean query)
If query is true, a dialog box will allow re-selection.
protected void setTopic_PlayerRight(Member member,
Topic player,
TNode tnode,
boolean query)
If query is true, a dialog box will allow re-selection.
protected void categorySelected(int category,
int clickcount)
public Topic selectRole()
protected void handlePopupMenuEvent(MouseEvent event,
int nodeID,
TMNode node)
public void selectType()
protected JPanel createButtonPanel()
protected void closing()
public void saveProperties()
protected void revertAssociation()
protected boolean saveAssociation()
public boolean somethingHasChanged()
protected void somethingMayHaveChanged()
protected void setDirty(boolean state)
public void updatePrototypeFont()
public boolean isInTransition()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||