Package jadex.base.gui
Class ComponentSelectorDialog
- java.lang.Object
-
- jadex.base.gui.ComponentSelectorDialog
-
- Direct Known Subclasses:
PlatformSelectorDialog
public class ComponentSelectorDialog extends java.lang.ObjectDialog to select an agent on the platform.
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanabortedWas the dialog aborted?protected IExternalAccessaccessThe shown platform.protected CMSUpdateHandlercmshandlerThe cms handler.protected javax.swing.JComponentcomptreePanel as field for repaint in addSelectedAgent.protected ComponentIconCacheiconcacheThe icon cache.protected static javax.swing.UIDefaultsiconsThe image icons.protected IExternalAccessjccaccessThe local platform.protected javax.swing.JListlistprotected javax.swing.JButtonnewaidButton as field for repaint in addSelectedAgent.protected javax.swing.JButtonokButton as field for repaint in addSelectedAgent.protected java.awt.ComponentparentThe parent component.protected PropertyUpdateHandlerprophandlerThe cms handler.protected javax.swing.JButtonremoveButton as field for repaint in addSelectedAgent.protected javax.swing.JButtonremoveallButton as field for repaint in addSelectedAgent.protected javax.swing.JButtonselectButton as field for repaint in addSelectedAgent.protected javax.swing.DefaultListModelselsThe selected agents.protected booleansingleselectionIs the single selection dialog showing?
-
Constructor Summary
Constructors Constructor Description ComponentSelectorDialog(java.awt.Component parent, IExternalAccess access, IExternalAccess jccaccess, CMSUpdateHandler cmshandler, PropertyUpdateHandler prophandler, ComponentIconCache iconcache)Create a new AgentSelectorDialog.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddSelected()protected voidaddSelectedAgent(IComponentIdentifier agent, javax.swing.JList list)Add an agent to the list of selected agentsprotected javax.swing.JDialogcreateDialog()Create the dialog.protected javax.swing.JComponentcreateTreeView()protected voiddisposeTreeView()protected java.lang.StringgetDialogName()protected java.lang.StringgetSelectedListName()protected IComponentIdentifiergetSelectedObject()protected java.lang.StringgetTreeViewName()protected booleanisTreeViewSelectionEmpty()IComponentIdentifierselectAgent(IComponentIdentifier def)Open a modal dialog to select/enter an agent identifier.IComponentIdentifier[]selectAgents(IComponentIdentifier[] receivers)Select/edit a list of agents.
-
-
-
Field Detail
-
icons
protected static final javax.swing.UIDefaults icons
The image icons.
-
parent
protected java.awt.Component parent
The parent component.
-
access
protected IExternalAccess access
The shown platform.
-
jccaccess
protected IExternalAccess jccaccess
The local platform.
-
cmshandler
protected CMSUpdateHandler cmshandler
The cms handler.
-
prophandler
protected PropertyUpdateHandler prophandler
The cms handler.
-
iconcache
protected ComponentIconCache iconcache
The icon cache.
-
sels
protected javax.swing.DefaultListModel sels
The selected agents.
-
singleselection
protected boolean singleselection
Is the single selection dialog showing?
-
aborted
protected boolean aborted
Was the dialog aborted?
-
select
protected javax.swing.JButton select
Button as field for repaint in addSelectedAgent.
-
newaid
protected javax.swing.JButton newaid
Button as field for repaint in addSelectedAgent.
-
remove
protected javax.swing.JButton remove
Button as field for repaint in addSelectedAgent.
-
removeall
protected javax.swing.JButton removeall
Button as field for repaint in addSelectedAgent.
-
ok
protected javax.swing.JButton ok
Button as field for repaint in addSelectedAgent.
-
comptree
protected javax.swing.JComponent comptree
Panel as field for repaint in addSelectedAgent.
-
list
protected javax.swing.JList list
-
-
Constructor Detail
-
ComponentSelectorDialog
public ComponentSelectorDialog(java.awt.Component parent, IExternalAccess access, IExternalAccess jccaccess, CMSUpdateHandler cmshandler, PropertyUpdateHandler prophandler, ComponentIconCache iconcache)Create a new AgentSelectorDialog.
-
-
Method Detail
-
selectAgent
public IComponentIdentifier selectAgent(IComponentIdentifier def)
Open a modal dialog to select/enter an agent identifier.- Returns:
- The selected agent identifier or null, when dialog was aborted.
-
selectAgents
public IComponentIdentifier[] selectAgents(IComponentIdentifier[] receivers)
Select/edit a list of agents.- Returns:
- The (possibly empty) list of agent identifiers or null, when dialog was aborted.
-
createDialog
protected javax.swing.JDialog createDialog()
Create the dialog.
-
createTreeView
protected javax.swing.JComponent createTreeView()
-
disposeTreeView
protected void disposeTreeView()
-
isTreeViewSelectionEmpty
protected boolean isTreeViewSelectionEmpty()
-
getSelectedObject
protected IComponentIdentifier getSelectedObject()
-
addSelected
protected void addSelected()
-
addSelectedAgent
protected void addSelectedAgent(IComponentIdentifier agent, javax.swing.JList list)
Add an agent to the list of selected agents- Parameters:
agent- The agent to add.
-
getDialogName
protected java.lang.String getDialogName()
-
getTreeViewName
protected java.lang.String getTreeViewName()
-
getSelectedListName
protected java.lang.String getSelectedListName()
-
-