|
||||||||||
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 |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, 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 Integer |
getChannelAtPoint(int x,
int y)
Get channel on [x,y]. |
abstract void |
moveSelected(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(Graphics g)
Repaints the composition panel. |
abstract void |
paintItem(Graphics g)
Paint bonus graphics on panel. |
void |
paintLinks(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(Integer key)
Deletes the given channel. |
void |
removeChannels(Integer key)
Deletes channels connected to the given module. |
void |
removeModule(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(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 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(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 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(Integer key)
key
- Key of module or group.public void removeChannels(Integer key)
key
- Module key.public void removeChannel(Integer key)
key
- Channel key.public abstract void moveSelected(Integer id, int nx, int ny)
id
- Key of item.nx
- Relative x coordinate.ny
- Relative y coordinate.public void paintComponent(Graphics g)
paintComponent
in class JComponent
public void paintLinks(Graphics g)
public abstract void paintItem(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 |