com.xj.anylogic.engine.presentation
Class ToolBar

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JToolBar
                  extended by com.xj.anylogic.engine.presentation.ToolBar
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.ChangeListener, javax.swing.event.PopupMenuListener, javax.swing.SwingConstants

public class ToolBar
extends javax.swing.JToolBar
implements java.awt.event.ActionListener, javax.swing.event.ChangeListener, javax.swing.event.PopupMenuListener

The toolbar used to control the experiment execution and presentation. You can configure the controls displayed on the toolbar bar via the toolbar API as well as using its context menu.

Author:
XJ Technologies Company Ltd. www.anylogic.com
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JToolBar
javax.swing.JToolBar.Separator
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.BaselineResizeBehavior
 
Field Summary
static int ANIMATION
           
static int EXECUTION
           
static int FILE
           
static int NAVIGATION
           
static int TIME_SCALE
           
static int VIEW
           
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Method of ActionListener interface.
 void hide()
           
 void popupMenuCanceled(javax.swing.event.PopupMenuEvent e)
          Method of PopupMenuListener interface.
 void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent e)
          Method of PopupMenuListener interface.
 void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent e)
          Method of PopupMenuListener interface.
 void remove(java.awt.Component comp)
           
 void remove(int index)
           
 void removeAll()
           
 void setAllowCustomization(boolean allowCustomization)
          Enables or disables toolbar sections showing/hiding using popup menu from right-click and extension button (enabled by default).
 void setSectionEnabled(int section, boolean enabled)
          Enables/disables all controls within a particular section on the toolbar.
 void setSectionVisible(int section, boolean visible)
          Shows/hides a particular section on the toolbar.
 void setVisible(boolean visible)
           
 void show(boolean b)
           
 void stateChanged(javax.swing.event.ChangeEvent e)
          Method of ChangeListener interface.
 
Methods inherited from class javax.swing.JToolBar
add, addSeparator, addSeparator, getAccessibleContext, getComponentAtIndex, getComponentIndex, getMargin, getOrientation, getUI, getUIClassID, isBorderPainted, isFloatable, isRollover, setBorderPainted, setFloatable, setLayout, setMargin, setOrientation, setRollover, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, 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, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, 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, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update
 
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, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, 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, getPeer, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FILE

public static final int FILE
See Also:
Constant Field Values

EXECUTION

public static final int EXECUTION
See Also:
Constant Field Values

TIME_SCALE

public static final int TIME_SCALE
See Also:
Constant Field Values

ANIMATION

public static final int ANIMATION
See Also:
Constant Field Values

VIEW

public static final int VIEW
See Also:
Constant Field Values

NAVIGATION

public static final int NAVIGATION
See Also:
Constant Field Values
Method Detail

setSectionVisible

public void setSectionVisible(int section,
                              boolean visible)
Shows/hides a particular section on the toolbar. The sections are: FILE, EXECUTION, TIME_SCALE, ANIMATION, VIEW, NAVIGATION

Parameters:
section - the section name
visible - if true - show section, if false - hide

setSectionEnabled

public void setSectionEnabled(int section,
                              boolean enabled)
Enables/disables all controls within a particular section on the toolbar. The sections are: FILE, EXECUTION, TIME_SCALE, ANIMATION, VIEW, NAVIGATION

Parameters:
section - the section name
enabled - if true enable, otherwise disable the section

setAllowCustomization

public void setAllowCustomization(boolean allowCustomization)
Enables or disables toolbar sections showing/hiding using popup menu from right-click and extension button (enabled by default).
Note, that programmatic section visibility change is always permitted.

Parameters:
allowCustomization - use false to disable sections visibility change
See Also:
setSectionVisible(int, boolean)

setVisible

public void setVisible(boolean visible)
Overrides:
setVisible in class javax.swing.JComponent

hide

public void hide()
Overrides:
hide in class java.awt.Component

show

public void show(boolean b)
Overrides:
show in class java.awt.Component

remove

public final void remove(java.awt.Component comp)
Overrides:
remove in class java.awt.Container

remove

public final void remove(int index)
Overrides:
remove in class java.awt.Container

removeAll

public final void removeAll()
Overrides:
removeAll in class java.awt.Container

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Method of ActionListener interface. Reacts to the object chooser combo box events.

Specified by:
actionPerformed in interface java.awt.event.ActionListener

popupMenuCanceled

public void popupMenuCanceled(javax.swing.event.PopupMenuEvent e)
Method of PopupMenuListener interface. Reacts to the object chooser combo box events.

Specified by:
popupMenuCanceled in interface javax.swing.event.PopupMenuListener

popupMenuWillBecomeInvisible

public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent e)
Method of PopupMenuListener interface. Reacts to the object chooser combo box events.

Specified by:
popupMenuWillBecomeInvisible in interface javax.swing.event.PopupMenuListener

popupMenuWillBecomeVisible

public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent e)
Method of PopupMenuListener interface. Reacts to the object chooser combo box events.

Specified by:
popupMenuWillBecomeVisible in interface javax.swing.event.PopupMenuListener

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent e)
Method of ChangeListener interface. Reacts to the active object index spinner events.

Specified by:
stateChanged in interface javax.swing.event.ChangeListener


Copyright © 1991-2008 XJ Technlogies. All Rights Reserved.