Package frame
Class DrawingFrame
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- java.awt.Window
-
- java.awt.Frame
-
- javax.swing.JFrame
-
- frame.DrawingFrame
-
- All Implemented Interfaces:
java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.io.Serializable
,javax.accessibility.Accessible
,javax.swing.RootPaneContainer
,javax.swing.WindowConstants
public class DrawingFrame extends javax.swing.JFrame
Class that contains view, all GUI elements of the application and notify controller when user do some action.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
-
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
-
-
Field Summary
Fields Modifier and Type Field Description private javax.swing.JList<java.lang.String>
activityLog
private javax.swing.JButton
btnBringToBack
private javax.swing.JButton
btnBringToFront
private javax.swing.JButton
btnDelete
private javax.swing.JButton
btnEdgeColor
private javax.swing.JButton
btnInteriorColor
private javax.swing.JButton
btnLog
private javax.swing.JButton
btnNewDraw
private javax.swing.JButton
btnRedo
private javax.swing.JButton
btnSaveDraw
private javax.swing.JButton
btnToBack
private javax.swing.JButton
btnToFront
private javax.swing.JButton
btnUndo
private javax.swing.JButton
btnUpdate
private javax.swing.ButtonGroup
buttonsGroup
private java.awt.Color
color
private DrawingController
controller
private javax.swing.DefaultListModel<java.lang.String>
dlmList
private javax.swing.JPanel
mainPanel
private java.awt.event.MouseAdapter
mouseAdapterBringToBack
private java.awt.event.MouseAdapter
mouseAdapterBringToFront
private java.awt.event.MouseAdapter
mouseAdapterDelete
private java.awt.event.MouseAdapter
mouseAdapterEdgeColor
private java.awt.event.MouseAdapter
mouseAdapterInteriorColor
private java.awt.event.MouseAdapter
mouseAdapterLog
private java.awt.event.MouseAdapter
mouseAdapterNewDraw
private java.awt.event.MouseAdapter
mouseAdapterRedo
private java.awt.event.MouseAdapter
mouseAdapterSaveDrawing
private java.awt.event.MouseAdapter
mouseAdapterToBack
private java.awt.event.MouseAdapter
mouseAdapterToFront
private java.awt.event.MouseAdapter
mouseAdapterUndo
private java.awt.event.MouseAdapter
mouseAdapterUpdate
private javax.swing.JScrollPane
scrollPane
private static long
serialVersionUID
private javax.swing.JToggleButton
tglBtnDrawCircle
private javax.swing.JToggleButton
tglBtnDrawHexagon
private javax.swing.JToggleButton
tglBtnDrawLine
private javax.swing.JToggleButton
tglBtnDrawPoint
private javax.swing.JToggleButton
tglBtnDrawRectangle
private javax.swing.JToggleButton
tglBtnDrawSquare
private javax.swing.JToggleButton
tglBtnSelect
private DrawingView
view
-
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
-
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
-
Constructor Summary
Constructors Constructor Description DrawingFrame()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.swing.JButton
getBtnBringToBack()
javax.swing.JButton
getBtnBringToFront()
javax.swing.JButton
getBtnDelete()
javax.swing.JButton
getBtnEdgeColor()
javax.swing.JButton
getBtnInteriorColor()
javax.swing.JButton
getBtnLog()
javax.swing.JButton
getBtnNewDraw()
javax.swing.JButton
getBtnRedo()
javax.swing.JButton
getBtnSaveDraw()
javax.swing.JButton
getBtnToBack()
javax.swing.JButton
getBtnToFront()
javax.swing.JButton
getBtnUndo()
javax.swing.JButton
getBtnUpdate()
javax.swing.DefaultListModel<java.lang.String>
getList()
java.awt.event.MouseAdapter
getMouseAdapterBringToBack()
java.awt.event.MouseAdapter
getMouseAdapterBringToFront()
java.awt.event.MouseAdapter
getMouseAdapterDelete()
java.awt.event.MouseAdapter
getMouseAdapterEdgeColor()
java.awt.event.MouseAdapter
getMouseAdapterInteriorColor()
java.awt.event.MouseAdapter
getMouseAdapterLog()
java.awt.event.MouseAdapter
getMouseAdapterNewDraw()
java.awt.event.MouseAdapter
getMouseAdapterRedo()
java.awt.event.MouseAdapter
getMouseAdapterSaveDrawing()
java.awt.event.MouseAdapter
getMouseAdapterToBack()
java.awt.event.MouseAdapter
getMouseAdapterToFront()
java.awt.event.MouseAdapter
getMouseAdapterUndo()
java.awt.event.MouseAdapter
getMouseAdapterUpdate()
javax.swing.JToggleButton
getTglBtnDrawCircle()
javax.swing.JToggleButton
getTglBtnDrawHexagon()
javax.swing.JToggleButton
getTglBtnDrawLine()
javax.swing.JToggleButton
getTglBtnDrawPoint()
javax.swing.JToggleButton
getTglBtnDrawRectangle()
javax.swing.JToggleButton
getTglBtnDrawSquare()
javax.swing.JToggleButton
getTglBtnSelect()
DrawingView
getView()
void
setController(DrawingController controller)
-
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
-
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
-
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFront
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
mainPanel
private javax.swing.JPanel mainPanel
-
buttonsGroup
private final javax.swing.ButtonGroup buttonsGroup
-
view
private DrawingView view
-
controller
private DrawingController controller
-
color
private java.awt.Color color
-
tglBtnSelect
private javax.swing.JToggleButton tglBtnSelect
-
tglBtnDrawPoint
private javax.swing.JToggleButton tglBtnDrawPoint
-
tglBtnDrawCircle
private javax.swing.JToggleButton tglBtnDrawCircle
-
tglBtnDrawHexagon
private javax.swing.JToggleButton tglBtnDrawHexagon
-
tglBtnDrawLine
private javax.swing.JToggleButton tglBtnDrawLine
-
tglBtnDrawSquare
private javax.swing.JToggleButton tglBtnDrawSquare
-
tglBtnDrawRectangle
private javax.swing.JToggleButton tglBtnDrawRectangle
-
btnUpdate
private javax.swing.JButton btnUpdate
-
btnDelete
private javax.swing.JButton btnDelete
-
btnUndo
private javax.swing.JButton btnUndo
-
btnRedo
private javax.swing.JButton btnRedo
-
btnToFront
private javax.swing.JButton btnToFront
-
btnToBack
private javax.swing.JButton btnToBack
-
btnBringToFront
private javax.swing.JButton btnBringToFront
-
btnBringToBack
private javax.swing.JButton btnBringToBack
-
btnNewDraw
private javax.swing.JButton btnNewDraw
-
btnSaveDraw
private javax.swing.JButton btnSaveDraw
-
btnLog
private javax.swing.JButton btnLog
-
btnInteriorColor
private javax.swing.JButton btnInteriorColor
-
btnEdgeColor
private javax.swing.JButton btnEdgeColor
-
mouseAdapterEdgeColor
private java.awt.event.MouseAdapter mouseAdapterEdgeColor
-
mouseAdapterInteriorColor
private java.awt.event.MouseAdapter mouseAdapterInteriorColor
-
mouseAdapterUpdate
private java.awt.event.MouseAdapter mouseAdapterUpdate
-
mouseAdapterDelete
private java.awt.event.MouseAdapter mouseAdapterDelete
-
mouseAdapterUndo
private java.awt.event.MouseAdapter mouseAdapterUndo
-
mouseAdapterRedo
private java.awt.event.MouseAdapter mouseAdapterRedo
-
mouseAdapterNewDraw
private java.awt.event.MouseAdapter mouseAdapterNewDraw
-
mouseAdapterSaveDrawing
private java.awt.event.MouseAdapter mouseAdapterSaveDrawing
-
mouseAdapterLog
private java.awt.event.MouseAdapter mouseAdapterLog
-
mouseAdapterToFront
private java.awt.event.MouseAdapter mouseAdapterToFront
-
mouseAdapterToBack
private java.awt.event.MouseAdapter mouseAdapterToBack
-
mouseAdapterBringToFront
private java.awt.event.MouseAdapter mouseAdapterBringToFront
-
mouseAdapterBringToBack
private java.awt.event.MouseAdapter mouseAdapterBringToBack
-
activityLog
private javax.swing.JList<java.lang.String> activityLog
-
dlmList
private javax.swing.DefaultListModel<java.lang.String> dlmList
-
scrollPane
private javax.swing.JScrollPane scrollPane
-
-
Method Detail
-
getList
public javax.swing.DefaultListModel<java.lang.String> getList()
-
getView
public DrawingView getView()
-
getTglBtnSelect
public javax.swing.JToggleButton getTglBtnSelect()
-
getBtnUpdate
public javax.swing.JButton getBtnUpdate()
-
getBtnDelete
public javax.swing.JButton getBtnDelete()
-
getBtnUndo
public javax.swing.JButton getBtnUndo()
-
getBtnRedo
public javax.swing.JButton getBtnRedo()
-
getBtnToFront
public javax.swing.JButton getBtnToFront()
-
getBtnToBack
public javax.swing.JButton getBtnToBack()
-
getBtnBringToFront
public javax.swing.JButton getBtnBringToFront()
-
getBtnBringToBack
public javax.swing.JButton getBtnBringToBack()
-
getBtnNewDraw
public javax.swing.JButton getBtnNewDraw()
-
getBtnSaveDraw
public javax.swing.JButton getBtnSaveDraw()
-
getBtnLog
public javax.swing.JButton getBtnLog()
-
getMouseAdapterUpdate
public java.awt.event.MouseAdapter getMouseAdapterUpdate()
-
getMouseAdapterDelete
public java.awt.event.MouseAdapter getMouseAdapterDelete()
-
getMouseAdapterUndo
public java.awt.event.MouseAdapter getMouseAdapterUndo()
-
getMouseAdapterRedo
public java.awt.event.MouseAdapter getMouseAdapterRedo()
-
getMouseAdapterNewDraw
public java.awt.event.MouseAdapter getMouseAdapterNewDraw()
-
getMouseAdapterSaveDrawing
public java.awt.event.MouseAdapter getMouseAdapterSaveDrawing()
-
getMouseAdapterLog
public java.awt.event.MouseAdapter getMouseAdapterLog()
-
getMouseAdapterToFront
public java.awt.event.MouseAdapter getMouseAdapterToFront()
-
getMouseAdapterToBack
public java.awt.event.MouseAdapter getMouseAdapterToBack()
-
getMouseAdapterBringToFront
public java.awt.event.MouseAdapter getMouseAdapterBringToFront()
-
getMouseAdapterBringToBack
public java.awt.event.MouseAdapter getMouseAdapterBringToBack()
-
getTglBtnDrawPoint
public javax.swing.JToggleButton getTglBtnDrawPoint()
-
getTglBtnDrawCircle
public javax.swing.JToggleButton getTglBtnDrawCircle()
-
getTglBtnDrawHexagon
public javax.swing.JToggleButton getTglBtnDrawHexagon()
-
getTglBtnDrawLine
public javax.swing.JToggleButton getTglBtnDrawLine()
-
getTglBtnDrawSquare
public javax.swing.JToggleButton getTglBtnDrawSquare()
-
getTglBtnDrawRectangle
public javax.swing.JToggleButton getTglBtnDrawRectangle()
-
getBtnInteriorColor
public javax.swing.JButton getBtnInteriorColor()
-
getBtnEdgeColor
public javax.swing.JButton getBtnEdgeColor()
-
getMouseAdapterEdgeColor
public java.awt.event.MouseAdapter getMouseAdapterEdgeColor()
-
getMouseAdapterInteriorColor
public java.awt.event.MouseAdapter getMouseAdapterInteriorColor()
-
setController
public void setController(DrawingController controller)
-
-