Package jadex.tools.starter
Class StarterPanel
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JLayeredPane
-
- jadex.tools.starter.StarterPanel
-
- All Implemented Interfaces:
java.awt.image.ImageObserver,java.awt.MenuContainer,java.io.Serializable,javax.accessibility.Accessible
public class StarterPanel extends javax.swing.JLayeredPaneThe starter gui allows for starting components platform independently.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classStarterPanel.KillListenerListener that is called on component kill.-
Nested classes/interfaces inherited from class javax.swing.JLayeredPane
javax.swing.JLayeredPane.AccessibleJLayeredPane
-
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.swing.JPanelapppanelThe application specific panel.protected java.util.Listargelemsprotected javax.swing.JPanelargumentsThe component arguments.protected booleanclosedprotected javax.swing.JTextFieldcomponentnameThe component type.protected javax.swing.JLabelcomponentnamelprotected javax.swing.JPanelcomponentpanelThe component specific panel.protected javax.swing.JLabelconfdummyprotected javax.swing.JComboBoxconfigThe configuration.protected javax.swing.JLabelconflprotected javax.swing.JComponentcontentThe content panel.protected BrowserPanedetailsThe model details.protected java.lang.StringerrorThe error (last loading).protected javax.swing.JTextFieldfilenameThe filename.protected javax.swing.JLabelfilenamelprotected javax.swing.JCheckBoxgennameThe component name generator flag.protected static javax.swing.UIDefaultsiconsThe image icons.protected IControlCenterjccThe jcc.protected doublelastdivlocThe last divider location.protected java.lang.StringlastfileThe last loaded filename.protected IResourceIdentifierlastridprotected java.lang.String[]loadargsloaded from jccproject.xml and kept until gui is refreshed asynchronously.protected java.lang.Stringloadconfigloaded from jccproject.xml and kept until gui is refreshed asynchronously.protected javax.swing.JComponentloadingThe loading indicator.protected java.lang.Stringloadnameloaded from jccproject.xml and kept until gui is refreshed asynchronously.protected IModelInfomodelThe model.protected javax.swing.JComboBoxmonicbprotected javax.swing.JSpinnernumcomponentsThe spinner for the number of components to start.protected IComponentIdentifierparentThe selected parent (if any).protected javax.swing.JTextFieldparenttfprotected javax.swing.JPanelprovidedservicesThe provided services.protected javax.swing.JPanelrequiredservicesThe used services.protected java.util.Listreselemsprotected javax.swing.JPanelresultsThe component results.protected MultiCollection<java.lang.String,java.lang.Object>resultsetsprotected javax.swing.JComboBoxselectavailprotected JSplitPanelsplitpanelThe split pane.protected javax.swing.JButtonstartThe start button.protected javax.swing.JCheckBoxstoreresultsprotected javax.swing.JCheckBoxsuspendThe suspend mode.protected javax.swing.JCheckBoxsynccbThe termination flags.-
Fields inherited from class javax.swing.JLayeredPane
DEFAULT_LAYER, DRAG_LAYER, FRAME_CONTENT_LAYER, LAYER_PROPERTY, MODAL_LAYER, PALETTE_LAYER, POPUP_LAYER
-
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
-
Constructor Summary
Constructors Constructor Description StarterPanel(IControlCenter jcc)Open the GUI.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidclearApplicationName()Clear the application name.protected voidclearArguments()Refresh the argument values.protected voidclearResults()Clear the result values.protected voidcreateArgumentGui(IArgument arg, int y)Create the gui for one argument.protected voidcreateArguments()Create the arguments panel.static IFuture<IComponentIdentifier>createComponent(IControlCenter jcc, IResourceIdentifier rid, java.lang.String type, java.lang.String name, java.lang.String configname, java.util.Map<java.lang.String,java.lang.Object> arguments, java.lang.Boolean suspend, java.lang.Boolean sync, IMonitoringService.PublishEventLevel moni, IResultListener<java.util.Map<java.lang.String,java.lang.Object>> killlistener, IComponentIdentifier parco, javax.swing.JComponent panel)Create a new component on the platform.protected voidcreateProvidedServices()Create the provided services panel.protected voidcreateRequiredServices()Create the required services panel.protected voidcreateResultGui(IArgument arg, int y)Create the gui for one argument.protected voidcreateResults()Create the results panel.java.lang.StringgetDefaultValue(IModelInfo model, java.lang.String arg, java.lang.String config)Get the default value for an argument.IFuture<Properties>getProperties()Get the properties.java.lang.StringgetResultDefaultValue(IModelInfo model, java.lang.String arg, java.lang.String config)Get the default value for a result.IFutureloadModel(java.lang.String adf, IResourceIdentifier rid)Load an component model.protected voidrefreshArguments()Refresh the argument values.protected voidrefreshDefaultResults()Refresh the default result values.protected voidrefreshFlags()Refresh the flags.protected voidrefreshResults()Refresh the result values.voidreloadModel()Reload the model.voidreset()Reset the gui.protected voidselectConfiguration(java.lang.String conf)Select a configuration.protected voidsetAutoGenerate(boolean autogen)Set the auto generate in gui.protected voidsetComponentName(java.lang.String name)Set the component name.voidsetParent(IComponentIdentifier parent)Set the current parent.IFuture<java.lang.Void>setProperties(Properties props)Set the properties.protected voidsetStartSuspended(boolean startsuspended)Set the start suspended flag in gui.protected voidshowLoading(IFuture fut)Show the loading panel and remove it when the future is done.-
Methods inherited from class javax.swing.JLayeredPane
addImpl, getAccessibleContext, getComponentCountInLayer, getComponentsInLayer, getComponentToLayer, getIndexOf, getLayer, getLayer, getLayeredPaneAbove, getObjectForLayer, getPosition, highestLayer, insertIndexForLayer, isOptimizedDrawingEnabled, lowestLayer, moveToBack, moveToFront, paint, paramString, putLayer, remove, removeAll, setLayer, setLayer, setPosition
-
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUI, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
icons
protected static final javax.swing.UIDefaults icons
The image icons.
-
model
protected IModelInfo model
The model.
-
error
protected java.lang.String error
The error (last loading).
-
lastfile
protected java.lang.String lastfile
The last loaded filename.
-
lastrid
protected IResourceIdentifier lastrid
-
parent
protected IComponentIdentifier parent
The selected parent (if any).
-
filename
protected javax.swing.JTextField filename
The filename.
-
config
protected javax.swing.JComboBox config
The configuration.
-
componentname
protected javax.swing.JTextField componentname
The component type.
-
componentnamel
protected javax.swing.JLabel componentnamel
-
parenttf
protected javax.swing.JTextField parenttf
-
suspend
protected javax.swing.JCheckBox suspend
The suspend mode.
-
synccb
protected javax.swing.JCheckBox synccb
The termination flags.
-
monicb
protected javax.swing.JComboBox monicb
-
confl
protected javax.swing.JLabel confl
-
confdummy
protected javax.swing.JLabel confdummy
-
filenamel
protected javax.swing.JLabel filenamel
-
genname
protected javax.swing.JCheckBox genname
The component name generator flag.
-
arguments
protected javax.swing.JPanel arguments
The component arguments.
-
argelems
protected java.util.List argelems
-
loadargs
protected java.lang.String[] loadargs
loaded from jccproject.xml and kept until gui is refreshed asynchronously.
-
loadconfig
protected java.lang.String loadconfig
loaded from jccproject.xml and kept until gui is refreshed asynchronously.
-
loadname
protected java.lang.String loadname
loaded from jccproject.xml and kept until gui is refreshed asynchronously.
-
results
protected javax.swing.JPanel results
The component results.
-
reselems
protected java.util.List reselems
-
storeresults
protected javax.swing.JCheckBox storeresults
-
selectavail
protected javax.swing.JComboBox selectavail
-
resultsets
protected MultiCollection<java.lang.String,java.lang.Object> resultsets
-
start
protected javax.swing.JButton start
The start button.
-
componentpanel
protected javax.swing.JPanel componentpanel
The component specific panel.
-
content
protected javax.swing.JComponent content
The content panel.
-
loading
protected javax.swing.JComponent loading
The loading indicator.
-
apppanel
protected javax.swing.JPanel apppanel
The application specific panel.
-
jcc
protected IControlCenter jcc
The jcc.
-
numcomponents
protected javax.swing.JSpinner numcomponents
The spinner for the number of components to start.
-
requiredservices
protected javax.swing.JPanel requiredservices
The used services.
-
providedservices
protected javax.swing.JPanel providedservices
The provided services.
-
details
protected BrowserPane details
The model details.
-
splitpanel
protected JSplitPanel splitpanel
The split pane.
-
lastdivloc
protected double lastdivloc
The last divider location.
-
closed
protected boolean closed
-
-
Constructor Detail
-
StarterPanel
public StarterPanel(IControlCenter jcc)
Open the GUI.- Parameters:
starter- The starter.
-
-
Method Detail
-
reloadModel
public void reloadModel()
Reload the model.- Parameters:
adf- The adf.
-
loadModel
public IFuture loadModel(java.lang.String adf, IResourceIdentifier rid)
Load an component model.- Parameters:
adf- The adf to load.
-
showLoading
protected void showLoading(IFuture fut)
Show the loading panel and remove it when the future is done.
-
refreshFlags
protected void refreshFlags()
Refresh the flags.
-
getProperties
public IFuture<Properties> getProperties()
Get the properties.- Parameters:
props- The properties.
-
setProperties
public IFuture<java.lang.Void> setProperties(Properties props)
Set the properties.- Parameters:
props- The propoerties.
-
reset
public void reset()
Reset the gui.
-
selectConfiguration
protected void selectConfiguration(java.lang.String conf)
Select a configuration.- Parameters:
conf- The configuration.
-
refreshArguments
protected void refreshArguments()
Refresh the argument values. Called only from gui thread.
-
refreshDefaultResults
protected void refreshDefaultResults()
Refresh the default result values. Called only from gui thread.
-
clearArguments
protected void clearArguments()
Refresh the argument values.
-
createArguments
protected void createArguments()
Create the arguments panel.
-
refreshResults
protected void refreshResults()
Refresh the result values.
-
clearResults
protected void clearResults()
Clear the result values.
-
createResults
protected void createResults()
Create the results panel.
-
createArgumentGui
protected void createArgumentGui(IArgument arg, int y)
Create the gui for one argument.- Parameters:
arg- The belief or belief reference.y- The row number where to add.
-
createResultGui
protected void createResultGui(IArgument arg, int y)
Create the gui for one argument.- Parameters:
arg- The belief or belief reference.y- The row number where to add.
-
createRequiredServices
protected void createRequiredServices()
Create the required services panel.
-
createProvidedServices
protected void createProvidedServices()
Create the provided services panel.
-
setComponentName
protected void setComponentName(java.lang.String name)
Set the component name.- Parameters:
name- The name.
-
clearApplicationName
protected void clearApplicationName()
Clear the application name.- Parameters:
name- The name.
-
setAutoGenerate
protected void setAutoGenerate(boolean autogen)
Set the auto generate in gui.- Parameters:
autogen- The autogen property.
-
setStartSuspended
protected void setStartSuspended(boolean startsuspended)
Set the start suspended flag in gui.- Parameters:
startsuspended- The start suspended flag property.
-
setParent
public void setParent(IComponentIdentifier parent)
Set the current parent.- Parameters:
parent- The component id.
-
createComponent
public static IFuture<IComponentIdentifier> createComponent(IControlCenter jcc, IResourceIdentifier rid, java.lang.String type, java.lang.String name, java.lang.String configname, java.util.Map<java.lang.String,java.lang.Object> arguments, java.lang.Boolean suspend, java.lang.Boolean sync, IMonitoringService.PublishEventLevel moni, IResultListener<java.util.Map<java.lang.String,java.lang.Object>> killlistener, IComponentIdentifier parco, javax.swing.JComponent panel)
Create a new component on the platform. Any errors will be displayed in a dialog to the user.
-
getDefaultValue
public java.lang.String getDefaultValue(IModelInfo model, java.lang.String arg, java.lang.String config)
Get the default value for an argument.
-
getResultDefaultValue
public java.lang.String getResultDefaultValue(IModelInfo model, java.lang.String arg, java.lang.String config)
Get the default value for a result.
-
-