script_editor_GUI
Class VAE_GenericBox

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by script_editor_GUI.VAE_Graph_Item
                      extended by script_editor_GUI.VAE_GenericBox
All Implemented Interfaces:
java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible
Direct Known Subclasses:
VAE_ObjectBox

public abstract class VAE_GenericBox
extends VAE_Graph_Item
implements java.io.Serializable

Boite g�n�rique. Contient les methodes de gestion des boites par l'utilisateur, Le liens les ports, et la gestion des port externes.

Author:
Matthieu Courgeon
See Also:
Serialized Form

Nested Class Summary
(package private)  class VAE_GenericBox.GenerixBoxAL
           
 
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
protected static java.awt.Cursor ARROW_CURSOR
           
static java.awt.Color EXT_INPUT_COLOR_TRUE
          Couleur standard de dessin des ports externes entrants d'une boite.
static java.awt.Color EXT_OUTPUT_COLOR_TRUE
          Couleur standard de dessin des ports externes sortants d'une boite.
protected  java.util.Vector<VAE_ExternalLink> externalInputs
           
protected  java.util.Vector<VAE_ExternalLink> externalOutputs
           
protected static java.awt.Cursor HAND_CURSOR
           
static java.awt.Color INPUT_COLOR_TRUE
          Couleur standard de dessin des ports entrants d'une boite.
protected  java.util.Vector<java.util.Vector<VAE_GenericLink>> inputLinks
           
protected  VAE_Patch_EditionPane insideScript
           
protected  int minHeight
           
protected  int minWidth
           
protected  java.lang.String name
           
static java.awt.Color NORMAL_BORDER
          Couleur standard de dessin des bord d'une boite selectionnée.
static java.awt.Color OUTPUT_COLOR_TRUE
          Couleur standard de dessin des ports sortant d'une boite.
protected  java.util.Vector<java.util.Vector<VAE_GenericLink>> outputLinks
           
protected static java.awt.Cursor RESIZE_CURSOR
           
static java.awt.Color SELECTED_BORDER
          Couleur standard de dessin des bord d'une boite non selectionnée.
protected  int staticInputPort
           
protected  int staticOutputPort
           
static java.awt.Color titleColorBottom
          Couleur standard 3 de dessin de la barre de titre d'une boite.
static java.awt.Color titleColorMid
          Couleur standard 2 de dessin de la barre de titre d'une boite.
static java.awt.Color titleColorTop
          Couleur standard 1 de dessin de la barre de titre d'une boite.
 
Fields inherited from class script_editor_GUI.VAE_Graph_Item
linkPath, manager, selected
 
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
VAE_GenericBox(int x, int y, int height, int width, int input, int output, VAE_Graph_Manager mngr)
           
VAE_GenericBox(int input, int output, VAE_Graph_Manager mngr)
           
 
Method Summary
 void activate()
           
protected  void addCopyItem(javax.swing.JPopupMenu menu)
           
 void addInputExternalPortSlot(VAE_ExternalLink link)
           
 boolean addInputLink(VAE_GenericLink l, int index)
           
 void addOutputExternalPortSlot(VAE_ExternalLink link)
           
 void addOutputLink(VAE_GenericLink l, int index)
           
 void CheckSize()
           
 void clearLinks()
           
 int clickedInputPort(int x, int y)
           
 int clickedOutputPort(int x, int y)
           
 java.util.Vector<VAE_GenericLink> getAllInputLinks(int port)
           
 java.util.Vector<VAE_GenericLink> getAllOutputLinks(int port)
           
 int getExternalInputCount()
           
protected  java.lang.String getExternalInputPortName(int index)
           
 int getExternalOutputCount()
           
protected  java.lang.String getExternalOutputPortName(int index)
           
 int getInputCount()
           
 java.util.Vector<VAE_GenericLink> getInputLinks(int index)
           
 java.awt.Point getInputPortLocalPosition(int index)
           
 java.awt.Point getInputPortPosition(int index)
           
 VAE_Patch_EditionPane getInsideScript()
           
 java.lang.String getName()
           
 int getOutputCount()
           
 java.util.Vector<VAE_GenericLink> getOutputLinks(int index)
           
 java.awt.Point getOutputPortLocalPosition(int index)
           
 java.awt.Point getOutputPortPosition(int index)
           
abstract  java.lang.String getPortName(int index)
           
abstract  VAE_Patch_EditionPane getScript(boolean createIfNeeded)
           
 boolean isTreeBox()
           
 void mouseClicked(java.awt.event.MouseEvent arg0)
           
 void mouseDragged(java.awt.event.MouseEvent arg0)
           
 void mouseMoved(java.awt.event.MouseEvent arg0)
           
 void mousePressed(java.awt.event.MouseEvent arg0)
           
 void mouseReleased(java.awt.event.MouseEvent arg0)
           
 void paintComponent(java.awt.Graphics g)
           
 void removeInputExternalPortSlot(int index)
           
 void removeInputLink(VAE_GenericLink l, int index)
           
 void removeOutputExternalPortSlot(int index)
           
 void removeOutputLink(VAE_GenericLink l, int index)
           
abstract  void removePopupMenu()
           
 void setName(java.lang.String n)
           
 boolean showPortContextMenu(int x, int y)
           
 void unselect()
           
abstract  void writeInto(java.io.PrintStream flux)
           
abstract  void writeInto(java.io.PrintStream flux, java.lang.String graphManagerName)
           
abstract  void writeSetValueAction(java.io.PrintStream flux, int incommingPort, java.lang.String value)
           
 void writeSetValueActionOnExternalPort(java.io.PrintStream flux, int incommingPort, java.lang.String value)
           
 
Methods inherited from class script_editor_GUI.VAE_Graph_Item
mouseEntered, mouseExited, showContextMenu
 
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, 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
 
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, 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, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, 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, 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

SELECTED_BORDER

public static java.awt.Color SELECTED_BORDER
Couleur standard de dessin des bord d'une boite non selectionnée.


NORMAL_BORDER

public static java.awt.Color NORMAL_BORDER
Couleur standard de dessin des bord d'une boite selectionnée.


INPUT_COLOR_TRUE

public static java.awt.Color INPUT_COLOR_TRUE
Couleur standard de dessin des ports entrants d'une boite.


OUTPUT_COLOR_TRUE

public static java.awt.Color OUTPUT_COLOR_TRUE
Couleur standard de dessin des ports sortant d'une boite.


EXT_INPUT_COLOR_TRUE

public static java.awt.Color EXT_INPUT_COLOR_TRUE
Couleur standard de dessin des ports externes entrants d'une boite.


EXT_OUTPUT_COLOR_TRUE

public static java.awt.Color EXT_OUTPUT_COLOR_TRUE
Couleur standard de dessin des ports externes sortants d'une boite.


titleColorTop

public static java.awt.Color titleColorTop
Couleur standard 1 de dessin de la barre de titre d'une boite.


titleColorMid

public static java.awt.Color titleColorMid
Couleur standard 2 de dessin de la barre de titre d'une boite.


titleColorBottom

public static java.awt.Color titleColorBottom
Couleur standard 3 de dessin de la barre de titre d'une boite.


HAND_CURSOR

protected static java.awt.Cursor HAND_CURSOR

RESIZE_CURSOR

protected static java.awt.Cursor RESIZE_CURSOR

ARROW_CURSOR

protected static java.awt.Cursor ARROW_CURSOR

insideScript

protected VAE_Patch_EditionPane insideScript

name

protected java.lang.String name

inputLinks

protected java.util.Vector<java.util.Vector<VAE_GenericLink>> inputLinks

outputLinks

protected java.util.Vector<java.util.Vector<VAE_GenericLink>> outputLinks

externalInputs

protected java.util.Vector<VAE_ExternalLink> externalInputs

externalOutputs

protected java.util.Vector<VAE_ExternalLink> externalOutputs

staticInputPort

protected int staticInputPort

staticOutputPort

protected int staticOutputPort

minWidth

protected int minWidth

minHeight

protected int minHeight
Constructor Detail

VAE_GenericBox

public VAE_GenericBox(int input,
                      int output,
                      VAE_Graph_Manager mngr)

VAE_GenericBox

public VAE_GenericBox(int x,
                      int y,
                      int height,
                      int width,
                      int input,
                      int output,
                      VAE_Graph_Manager mngr)
Method Detail

getInsideScript

public VAE_Patch_EditionPane getInsideScript()

getInputLinks

public java.util.Vector<VAE_GenericLink> getInputLinks(int index)

getOutputLinks

public java.util.Vector<VAE_GenericLink> getOutputLinks(int index)

addInputLink

public boolean addInputLink(VAE_GenericLink l,
                            int index)

removeOutputLink

public void removeOutputLink(VAE_GenericLink l,
                             int index)

removeInputLink

public void removeInputLink(VAE_GenericLink l,
                            int index)

addOutputLink

public void addOutputLink(VAE_GenericLink l,
                          int index)

getInputCount

public int getInputCount()

getOutputCount

public int getOutputCount()

setName

public void setName(java.lang.String n)
Overrides:
setName in class java.awt.Component

getName

public java.lang.String getName()
Overrides:
getName in class java.awt.Component

paintComponent

public void paintComponent(java.awt.Graphics g)
Overrides:
paintComponent in class javax.swing.JComponent

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent arg0)
Specified by:
mouseClicked in interface java.awt.event.MouseListener
Overrides:
mouseClicked in class VAE_Graph_Item

mousePressed

public void mousePressed(java.awt.event.MouseEvent arg0)
Specified by:
mousePressed in interface java.awt.event.MouseListener
Overrides:
mousePressed in class VAE_Graph_Item

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent arg0)
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener
Overrides:
mouseDragged in class VAE_Graph_Item

CheckSize

public void CheckSize()

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent arg0)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener
Overrides:
mouseMoved in class VAE_Graph_Item

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent arg0)
Specified by:
mouseReleased in interface java.awt.event.MouseListener
Overrides:
mouseReleased in class VAE_Graph_Item

activate

public void activate()
Specified by:
activate in class VAE_Graph_Item

unselect

public void unselect()
Specified by:
unselect in class VAE_Graph_Item

getInputPortLocalPosition

public java.awt.Point getInputPortLocalPosition(int index)

getOutputPortLocalPosition

public java.awt.Point getOutputPortLocalPosition(int index)

getInputPortPosition

public java.awt.Point getInputPortPosition(int index)

getOutputPortPosition

public java.awt.Point getOutputPortPosition(int index)

clickedOutputPort

public int clickedOutputPort(int x,
                             int y)

clickedInputPort

public int clickedInputPort(int x,
                            int y)

getExternalInputCount

public int getExternalInputCount()

removeInputExternalPortSlot

public void removeInputExternalPortSlot(int index)

removeOutputExternalPortSlot

public void removeOutputExternalPortSlot(int index)

addInputExternalPortSlot

public void addInputExternalPortSlot(VAE_ExternalLink link)

addOutputExternalPortSlot

public void addOutputExternalPortSlot(VAE_ExternalLink link)

getExternalOutputCount

public int getExternalOutputCount()

getExternalOutputPortName

protected java.lang.String getExternalOutputPortName(int index)

getExternalInputPortName

protected java.lang.String getExternalInputPortName(int index)

getPortName

public abstract java.lang.String getPortName(int index)

getScript

public abstract VAE_Patch_EditionPane getScript(boolean createIfNeeded)

showPortContextMenu

public boolean showPortContextMenu(int x,
                                   int y)

isTreeBox

public boolean isTreeBox()

writeInto

public abstract void writeInto(java.io.PrintStream flux)

writeInto

public abstract void writeInto(java.io.PrintStream flux,
                               java.lang.String graphManagerName)

writeSetValueAction

public abstract void writeSetValueAction(java.io.PrintStream flux,
                                         int incommingPort,
                                         java.lang.String value)

writeSetValueActionOnExternalPort

public void writeSetValueActionOnExternalPort(java.io.PrintStream flux,
                                              int incommingPort,
                                              java.lang.String value)

getAllInputLinks

public java.util.Vector<VAE_GenericLink> getAllInputLinks(int port)

getAllOutputLinks

public java.util.Vector<VAE_GenericLink> getAllOutputLinks(int port)

clearLinks

public void clearLinks()

addCopyItem

protected void addCopyItem(javax.swing.JPopupMenu menu)

removePopupMenu

public abstract void removePopupMenu()