Download Method Detail
Transcript
gui DrawingArea java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel gui.DrawingArea All Implemented Interfaces: Accessible, Serializable, ImageObserver, MenuContainer public class DrawingArea extends JPanel The area of the program, where logic circuits are drawn. All calculations and changes are performed in DrawingService. DrawingArea is just displaying the logic circuit. Constructor Summary Page DrawingArea(Controller controller) 102 Constructs an new DrawingArea Method Summary protected void void Page paintComponent(Graphics g) 103 removeCurrentNode() 103 Removes the Node that is currently displayed. void removePopup() 104 Removes the current popup. void removeSelection() 103 Removes the current selection. void setCurrentLine(GateConnection con) 103 Sets a GateConnection that is currently constructed by the user and should be displayed. void setCurrentNode(Node node) 103 Sets the current node that should be displayed. void setGraph(Graph graph) 103 Sets the Graph that should be displayed. void setGrid(GridService grid) 103 Sets the grid of the DrawingArea. void setSelection(Rectangle selection) 103 Sets a selected area in the DrawingArea. void showComponentPopup(DrawableComponent dc) 104 Shows a popup with options to modify a component. void showConnectionPopup(Node currentNode) 104 Shows a popup with options to modify the connection of the current node. void showSelectionPopup() Shows a popup to modify the current selection. Constructor Detail DrawingArea public DrawingArea(Controller controller) Constructs an new DrawingArea Parameters: controller - The controller of this program. 102 104