|
||||||||||
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
public abstract class CompositionGUI
Abstract class that cares about visual representation of 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_REMOVE
|
static int |
ACTION_MODULE_REMOVE
|
boolean |
canDelete
Flag for deleting modules. |
protected int |
countSelected
Count of selected modules. |
protected UniqueId |
idChannel
Numerical order for channels. |
protected UniqueId |
idModules
Numerical order for modules and groups. |
InfoGroup |
info
Info about Composition. |
protected InfoPlug |
plugFrom
Active plug for new channel. |
protected InfoPlug |
plugTo
Active plug for new channel. |
ActionsUndo |
undoReg
Undo/Redo object. |
protected ZoomWindow |
zoom
Zoom window. |
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 | |
---|---|
CompositionGUI()
Default constructor. |
Method Summary | |
---|---|
abstract void |
connectWithOther(InfoModule infoM)
Connects the given module with others.. |
abstract void |
delete()
Deletes the module. |
protected java.lang.Integer |
getChannelAtPoint(int x,
int y)
Get channel on [x,y]. |
abstract void |
moveSelected(java.lang.Integer id,
int nx,
int ny)
Moves all selected items. |
protected void |
moveToBack(ModuleGUI module)
Moves module back. |
protected void |
moveToFront(ModuleGUI module)
Moves module front. |
abstract void |
newGroup(InfoGroup _info)
Adds a new group. |
abstract void |
newChannel(InfoChannel _info)
Adds a new channel. |
abstract InfoChannel |
newChannelTemp()
Creates new temporary channel. |
abstract void |
newModule(InfoModule _info)
Adds a new module. |
void |
paintComponent(java.awt.Graphics g)
Repaints the composition panel. |
abstract void |
paintItem(java.awt.Graphics g)
Paint bonus graphics on panel. |
void |
paintLinks(java.awt.Graphics g)
Paints links between modules-plugs composition-plugs. |
void |
readInfo()
Reads composition and creates all it's components. |
void |
redo(ActionsUndoReg action)
Redoes last undoed action. |
void |
removeChannel(java.lang.Integer key)
Deletes the given channel. |
void |
removeChannels(java.lang.Integer key)
Deletes channels connected to the given module. |
void |
removeModule(java.lang.Integer key)
Deletes the given module. |
void |
repaintParent()
Repaint the parent composition. |
abstract void |
replaceModule(InfoModule _info)
Replaces module with new one. |
void |
selectAll(boolean _sel)
[Un]selects all modules. |
protected void |
setCompositionSize()
Sets bounds of Working space. |
void |
setGroup()
Creates a new group. |
void |
setIDModule(InfoPlug plug)
Sets active plug for a new channel. |
protected void |
setIDModuleFrom(InfoPlug plug)
Sets starting plug for a new channel. |
protected void |
setIDModuleTo(InfoPlug plug)
Sets ending plug for a new channel. |
void |
setSelectModule(java.lang.Object id,
boolean sel)
Changes selection-state of module or group. |
void |
undo(ActionsUndoReg action)
Undo last action. |
void |
ungroup()
Dismisses all selected groups. |
void |
unsetGroup(InfoGroup ig)
Dismisses the existing group. |
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 InfoGroup info
protected UniqueId idModules
protected UniqueId idChannel
protected InfoPlug plugFrom
protected InfoPlug plugTo
protected ZoomWindow zoom
public ActionsUndo undoReg
public static final int ACTION_MODULE_REMOVE
public static final int ACTION_CHANNEL_REMOVE
public boolean canDelete
protected int countSelected
Constructor Detail |
---|
public CompositionGUI()
Method Detail |
---|
public abstract void replaceModule(InfoModule _info)
_info
- Information about old module.public abstract void newModule(InfoModule _info)
_info
- Information about module.public abstract void newChannel(InfoChannel _info)
_info
- Information about channel.public abstract InfoChannel newChannelTemp()
public abstract void newGroup(InfoGroup _info)
public void readInfo()
public void selectAll(boolean _sel)
public void setSelectModule(java.lang.Object id, boolean sel)
id
- Module key.sel
- New selection state.public void setIDModule(InfoPlug plug)
plug
- Active plug.protected void setIDModuleFrom(InfoPlug plug)
plug
- Active plug.protected void setIDModuleTo(InfoPlug plug)
plug
- Active plug.protected java.lang.Integer getChannelAtPoint(int x, int y)
x
- X-coordinate.y
- Y-coordinate.
null
if not found.public void setGroup()
public void unsetGroup(InfoGroup ig)
public void ungroup()
public abstract void connectWithOther(InfoModule infoM)
public abstract void delete()
public void removeModule(java.lang.Integer key)
key
- Key of module or group.public void removeChannels(java.lang.Integer key)
key
- Module key.public void removeChannel(java.lang.Integer key)
key
- Channel key.public abstract void moveSelected(java.lang.Integer id, int nx, int ny)
id
- Key of item.nx
- Relative x coordinate.ny
- Relative y coordinate.public void paintComponent(java.awt.Graphics g)
paintComponent
in class javax.swing.JComponent
public void paintLinks(java.awt.Graphics g)
public abstract void paintItem(java.awt.Graphics g)
protected void setCompositionSize()
public void undo(ActionsUndoReg action)
undo
in interface Undo
action
- Action to un-done.public void redo(ActionsUndoReg action)
redo
in interface Undo
action
- Action to re-done.public void repaintParent()
protected void moveToFront(ModuleGUI module)
protected void moveToBack(ModuleGUI module)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |