|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
cz.cuni.jagrlib.gui.CompositionGUI
cz.cuni.jagrlib.gui.CompositionGUIBasic
public class CompositionGUIBasic
Basic class that cares about visual representation of a composition.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
static int |
ACTION_CHANNEL_ADD
|
static int |
ACTION_MODULE_ADD
Undo/Redo constants. |
Fields inherited from class cz.cuni.jagrlib.gui.CompositionGUI |
---|
ACTION_CHANNEL_REMOVE, ACTION_MODULE_REMOVE, canDelete, countSelected, idChannel, idModules, info, plugFrom, plugTo, undoReg, zoom |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, 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 java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
CompositionGUIBasic()
Default constructor. |
|
CompositionGUIBasic(java.lang.Integer _key)
Creates new CompositionGUIBasic. |
Method Summary | |
---|---|
void |
connectWithOther(InfoModule infoM)
Connects the given module with others.. |
void |
delete()
Delete all selected modules. |
InfoChannel |
findChannel(InfoPlug _plug1,
InfoPlug _plug2)
Looking for channel connecting two given plugs. |
InfoModule |
findModule(java.lang.String _name)
Finds module with field Name equals _name. |
static InfoPlug |
findOpposite(InfoPlug _find,
InfoModule _module)
Looking for opposite plug in the given module. |
void |
moveSelected(java.lang.Integer id,
int nx,
int ny)
Moves all selected items. |
void |
newGroup(InfoGroup _info)
Adds a new group. |
void |
newGroup(int x,
int y,
InfoGroup _info)
Adds a new group at position [ x, y ]. |
void |
newChannel()
Creates new channel connecting idModuleFrom and idModuleTo. |
void |
newChannel(InfoChannel _info)
Adds a new channel. |
InfoChannel |
newChannelTemp()
Creates new temporary channel. |
void |
newModule(InfoModule _info)
Adds a new module. |
void |
newModule(int x,
int y)
Adds a new module at the given position. |
void |
newModule(int x,
int y,
InfoModule _info)
Adds a new module at position [ x, y ]. |
void |
paintChannels(java.awt.Graphics g)
Paint bonus items of Channels. |
void |
paintItem(java.awt.Graphics g)
Paints bonus graphics on panel - Modules, Channels. |
void |
paintLinks(java.awt.Graphics g)
Paints links between modules-plugs composition-plugs. |
void |
redo(ActionsUndoReg action)
Redo last undoed action. |
void |
renameNewModule(InfoModule _newModule)
If the new module has the same name as any other in composition, rename it! |
void |
replaceModule(InfoModule infoOld)
Replace module with new one. |
void |
setGroup()
Creates a new group from all selected modules. |
void |
undo(ActionsUndoReg action)
Undo last action. |
void |
unsetGroup(InfoGroup ig)
Dismisses the given group |
Methods inherited from class cz.cuni.jagrlib.gui.CompositionGUI |
---|
getChannelAtPoint, moveToBack, moveToFront, paintComponent, readInfo, removeChannel, removeChannels, removeModule, repaintParent, selectAll, setCompositionSize, setIDModule, setIDModuleFrom, setIDModuleTo, setSelectModule, ungroup |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
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, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printComponent, printChildren, 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 |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, 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, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, 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, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, checkImage, checkImage, 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, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int ACTION_MODULE_ADD
public static final int ACTION_CHANNEL_ADD
Constructor Detail |
---|
public CompositionGUIBasic()
public CompositionGUIBasic(java.lang.Integer _key)
Method Detail |
---|
public void connectWithOther(InfoModule infoM)
connectWithOther
in class CompositionGUI
public InfoModule findModule(java.lang.String _name)
_name
- Module name to find.
_name
or null
.public void renameNewModule(InfoModule _newModule)
_newModule
- New module to add.public void delete()
delete
in class CompositionGUI
public void replaceModule(InfoModule infoOld)
replaceModule
in class CompositionGUI
infoOld
- Information about old module.public void newModule(int x, int y)
x
- X-coordinate of the insertion point.y
- Y-coordinate of the insertion point.public void newModule(InfoModule _info)
newModule
in class CompositionGUI
_info
- Information about module.public void newChannel(InfoChannel _info)
newChannel
in class CompositionGUI
_info
- Information about channel.public void newGroup(InfoGroup _info)
newGroup
in class CompositionGUI
_info
- Information about group.public void setGroup()
setGroup
in class CompositionGUI
public void unsetGroup(InfoGroup ig)
unsetGroup
in class CompositionGUI
public void newChannel()
public InfoChannel newChannelTemp()
newChannelTemp
in class CompositionGUI
public static InfoPlug findOpposite(InfoPlug _find, InfoModule _module)
_find
- Plug to look for._module
- Module to be searched.
null
.public InfoChannel findChannel(InfoPlug _plug1, InfoPlug _plug2)
_plug1
- Plug #1._plug2
- Plug #2.
null
.public void newModule(int x, int y, InfoModule _info)
x
- X-coordinate.y
- Y-coordinate._info
- Module.public void newGroup(int x, int y, InfoGroup _info)
x
- X-axis.y
- Y-axis._info
- Group.public void moveSelected(java.lang.Integer id, int nx, int ny)
moveSelected
in class CompositionGUI
id
- Key of item.nx
- Relative x coordinate.ny
- Relative y coordinate.public void paintChannels(java.awt.Graphics g)
g
- Graphics to paint to.public void paintLinks(java.awt.Graphics g)
paintLinks
in class CompositionGUI
g
- Graphics to paint to.public void paintItem(java.awt.Graphics g)
paintItem
in class CompositionGUI
public void undo(ActionsUndoReg action)
undo
in interface Undo
undo
in class CompositionGUI
action
- Action to be done.public void redo(ActionsUndoReg action)
redo
in interface Undo
redo
in class CompositionGUI
action
- Action to be re-done.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |