Package jadex.base.gui
Class ComponentSelectorDialog
- java.lang.Object
-
- jadex.base.gui.ComponentSelectorDialog
-
- Direct Known Subclasses:
PlatformSelectorDialog
public class ComponentSelectorDialog extends java.lang.Object
Dialog to select an agent on the platform.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
aborted
Was the dialog aborted?protected IExternalAccess
access
The shown platform.protected CMSUpdateHandler
cmshandler
The cms handler.protected javax.swing.JComponent
comptree
Panel as field for repaint in addSelectedAgent.protected ComponentIconCache
iconcache
The icon cache.protected static javax.swing.UIDefaults
icons
The image icons.protected IExternalAccess
jccaccess
The local platform.protected javax.swing.JList
list
protected javax.swing.JButton
newaid
Button as field for repaint in addSelectedAgent.protected javax.swing.JButton
ok
Button as field for repaint in addSelectedAgent.protected java.awt.Component
parent
The parent component.protected PropertyUpdateHandler
prophandler
The cms handler.protected javax.swing.JButton
remove
Button as field for repaint in addSelectedAgent.protected javax.swing.JButton
removeall
Button as field for repaint in addSelectedAgent.protected javax.swing.JButton
select
Button as field for repaint in addSelectedAgent.protected javax.swing.DefaultListModel
sels
The selected agents.protected boolean
singleselection
Is 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 void
addSelected()
protected void
addSelectedAgent(IComponentIdentifier agent, javax.swing.JList list)
Add an agent to the list of selected agentsprotected javax.swing.JDialog
createDialog()
Create the dialog.protected javax.swing.JComponent
createTreeView()
protected void
disposeTreeView()
protected java.lang.String
getDialogName()
protected java.lang.String
getSelectedListName()
protected IComponentIdentifier
getSelectedObject()
protected java.lang.String
getTreeViewName()
protected boolean
isTreeViewSelectionEmpty()
IComponentIdentifier
selectAgent(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()
-
-