|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--javax.swing.JPanel
|
+--com.jfimagine.jfdraw.gui.DrawAdapter
|
+--com.jfimagine.jfdraw.gui.CADPane
Main CAD class. A class used to create the main framework for jfdraw.
| Nested Class Summary |
| Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary |
| Fields inherited from class com.jfimagine.jfdraw.gui.DrawAdapter |
listenerList |
| Fields inherited from class javax.swing.JComponent |
accessibleContext, 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 | |
CADPane()
Constructor |
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
Process actions from menus/buttons. |
void |
appendWindowTitles()
Append all window titles to window menu for furthur toggle operations. |
void |
closeAllWindows()
close all sub windows if this adapter contains internal frames. |
static void |
createAndShowGUI(java.lang.String[] files)
Create the GUI and show it. |
javax.swing.JMenuBar |
createMenuBar()
Create menu bar. |
javax.swing.JToolBar |
createToolBar()
Create tool bar. |
void |
focusWindowByTitle(java.lang.String title)
Focus window by title |
DrawFrame |
getCurrentFrame()
get currently focused internal frame in cad pane. |
javax.swing.JDesktopPane |
getDesktop()
getter for desktop |
DrawCanvas |
getDrawCanvas()
get current drawing canvas in focused internal frame. |
javax.swing.JPopupMenu |
getEllipseMenu()
getter for ellipse menu. |
java.lang.String |
getFileName()
get the file name of current opened page. |
javax.swing.JPopupMenu |
getGraphMenu()
getter for graph menu. |
javax.swing.JPopupMenu |
getLineMenu()
getter for line menu. |
javax.swing.JPopupMenu |
getPolygonMenu()
getter for polygon menu. |
javax.swing.JPopupMenu |
getRectangleMenu()
getter for rectangle menu. |
javax.swing.JToolBar |
getToolBar()
get the main tool bar object. |
void |
itemStateChanged(java.awt.event.ItemEvent e)
Invoked when an item has been selected or deselected. |
static void |
main(java.lang.String[] args)
test |
void |
newFile()
new file operation. |
void |
notifyObjectSelected(ObjectList objList)
Notify object selected, tell to do some changes in the drawing framework. |
boolean |
openFile(java.lang.String fileName)
open a specified file |
void |
openFiles(java.lang.String[] files)
Tell CADPane to open files. |
boolean |
saveFile(java.lang.String fileName)
Save current page to a specified file. |
void |
setFileName(java.lang.String fileName)
set the file name of current opened page. |
void |
setIsMetric(boolean isMetric)
set the current ruler is under metric or english |
void |
setLayerName(java.lang.String layerName)
set current layer name |
| Methods inherited from class com.jfimagine.jfdraw.gui.DrawAdapter |
addGraphEventListener, fireAction, fireGraphEvent, getIsMetric, removeGraphEventListener, setDefaultFrameParameters |
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, 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, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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 |
| Constructor Detail |
public CADPane()
| Method Detail |
public void openFiles(java.lang.String[] files)
files - A file list that to be opened.public javax.swing.JMenuBar createMenuBar()
public javax.swing.JToolBar createToolBar()
public javax.swing.JDesktopPane getDesktop()
getDesktop in class DrawAdapterpublic javax.swing.JToolBar getToolBar()
public javax.swing.JPopupMenu getLineMenu()
public javax.swing.JPopupMenu getRectangleMenu()
public javax.swing.JPopupMenu getEllipseMenu()
public javax.swing.JPopupMenu getPolygonMenu()
public javax.swing.JPopupMenu getGraphMenu()
public void setIsMetric(boolean isMetric)
setIsMetric in class DrawAdapterisMetric - True if metric, false english.public void setLayerName(java.lang.String layerName)
setLayerName in class DrawAdapterlayerName - Current layernamepublic void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged in interface java.awt.event.ItemListenerpublic void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListeneractionPerformed in class DrawAdaptere - An action event sent by menus/buttons.public void notifyObjectSelected(ObjectList objList)
notifyObjectSelected in class DrawAdapterobjList - A new selected object list.public static void createAndShowGUI(java.lang.String[] files)
files - A file list that to be opened while jfdraw startup.public void closeAllWindows()
DrawAdapter
closeAllWindows in class DrawAdapterpublic DrawFrame getCurrentFrame()
public DrawCanvas getDrawCanvas()
getDrawCanvas in class DrawAdapterpublic void appendWindowTitles()
public void focusWindowByTitle(java.lang.String title)
focusWindowByTitle in class DrawAdaptertitle - A specified window title.public void newFile()
newFile in class DrawAdapterpublic boolean openFile(java.lang.String fileName)
openFile in class DrawAdapterfileName - A spcified file namepublic boolean saveFile(java.lang.String fileName)
saveFile in class DrawAdapterfileName - A file to be saved into.public java.lang.String getFileName()
getFileName in class DrawAdapterpublic void setFileName(java.lang.String fileName)
setFileName in class DrawAdapterfileName - A new file namepublic static void main(java.lang.String[] args)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||