Inheritance diagram for LayeredCanvasPane::
Public Methods | |
LayeredCanvasPane (IcsCanvas editor, IcsCanvas visualizer) | |
Constructor. More... | |
void | setSize (Dimension d) |
Overrides Component interface. More... | |
Dimension | getMinimumSize () |
Overrides Component interface. More... | |
Dimension | getPreferredSize () |
Overrides JComponent interface. More... | |
void | handleSetSize (Dimension d) |
Implementation of IcsCanvasUser. More... | |
Dimension | getMaxObjectExtent () |
Implementation of IcsCanvasUser. More... | |
void | mousePressed (MouseEvent e) |
Implementation of MouseListener. More... | |
void | mouseEntered (MouseEvent e) |
Implementation of MouseListener. More... | |
void | mouseExited (MouseEvent e) |
Implementation of MouseListener. More... | |
void | mouseClicked (MouseEvent e) |
Implementation of MouseListener. More... | |
void | mouseReleased (MouseEvent e) |
Implementation of MouseListener. More... | |
void | mouseMoved (MouseEvent e) |
Implementation of MouseMotionListener. More... | |
void | mouseDragged (MouseEvent e) |
Implementation of MouseMotionListener. More... |
|
00034 { 00035 _editor = editor; 00036 _visualizer = visualizer; 00037 00038 int width = IcsCanvas.MIN_SIZE; 00039 int height = IcsCanvas.MIN_SIZE; 00040 if (_editor != null) { 00041 Dimension d = _editor.getDimensionCCS(); 00042 width = Math.max(width, d.width); 00043 height = Math.max(height, d.height); 00044 _editor.setUser(this); 00045 add(_editor, new Integer(2)); 00046 } 00047 if (_visualizer != null) { 00048 Dimension d = _visualizer.getDimensionCCS(); 00049 width = Math.max(width, d.width); 00050 height = Math.max(height, d.height); 00051 _visualizer.setUser(this); 00052 add(_visualizer, new Integer(1)); 00053 if (_editor != null) 00054 _editor.setOpaque(false); 00055 } 00056 super.setSize(new Dimension(width, height)); 00057 addMouseListener(this); 00058 addMouseMotionListener(this); 00059 } |
|
Overrides Component interface.
00065 { 00066 super.setSize(d); 00067 } |
|
Overrides Component interface.
|
|
Overrides JComponent interface.
00081 { 00082 int width = IcsCanvas.MIN_SIZE; 00083 int height = IcsCanvas.MIN_SIZE; 00084 if (_editor != null) { 00085 Dimension d = _editor.getPreferredSize(); 00086 width = Math.max(width, d.width); 00087 height = Math.max(height, d.height); 00088 } 00089 if (_visualizer != null) { 00090 Dimension d = _visualizer.getPreferredSize(); 00091 width = Math.max(width, d.width); 00092 height = Math.max(height, d.height); 00093 } 00094 return new Dimension(width, height); 00095 } |
|
Implementation of IcsCanvasUser.
Reimplemented from IcsCanvasUser.
00101 { 00102 setSize(d); 00103 } |
|
Implementation of IcsCanvasUser.
Reimplemented from IcsCanvasUser.
00109 { 00110 int width = IcsCanvas.MIN_SIZE; 00111 int height = IcsCanvas.MIN_SIZE; 00112 if (_editor != null) { 00113 Dimension d = _editor.getObjectExtent(); 00114 width = Math.max(width, d.width); 00115 height = Math.max(height, d.height); 00116 } 00117 if (_visualizer != null) { 00118 Dimension d = _visualizer.getObjectExtent(); 00119 width = Math.max(width, d.width); 00120 height = Math.max(height, d.height); 00121 } 00122 return new Dimension(width, height); 00123 } |
|
Implementation of MouseListener.
00132 { 00133 if (_editor != null) 00134 _editor.handleMousePress(e); 00135 if (_visualizer != null) 00136 _visualizer.handleMousePress(e); 00137 } |
|
Implementation of MouseListener.
00143 { 00144 if (_editor != null) 00145 _editor.handleMouseEnter(e); 00146 if (_visualizer != null) 00147 _visualizer.handleMouseEnter(e); 00148 } |
|
Implementation of MouseListener.
00154 { 00155 if (_editor != null) 00156 _editor.handleMouseExit(e); 00157 if (_visualizer != null) 00158 _visualizer.handleMouseExit(e); 00159 } |
|
Implementation of MouseListener.
00165 { 00166 if (_editor != null) 00167 _editor.handleMouseClick(e); 00168 if (_visualizer != null) 00169 _visualizer.handleMouseClick(e); 00170 } |
|
Implementation of MouseListener.
00176 { 00177 if (_editor != null) 00178 _editor.handleMouseRelease(e); 00179 if (_visualizer != null) 00180 _visualizer.handleMouseRelease(e); 00181 } |
|
Implementation of MouseMotionListener.
00187 { 00188 if (_editor != null) 00189 _editor.handleMouseMove(e); 00190 if (_visualizer != null) 00191 _visualizer.handleMouseMove(e); 00192 } |
|
Implementation of MouseMotionListener.
00198 { 00199 if (_editor != null) 00200 _editor.handleMouseDrag(e); 00201 if (_visualizer != null) 00202 _visualizer.handleMouseDrag(e); 00203 } |