jdraw.jdraw_ui
Class ToolsPalette

java.lang.Object
  |
  +--mvp.View
        |
        +--jdraw.jdraw_ui.ToolsPalette
All Implemented Interfaces:
java.util.Observer

public class ToolsPalette
extends mvp.View

Class ToolsPalette is the companion view class for the Tools model. The palette class contains methods for calling all actions indicated by the visual pallete's icons.


Field Summary
protected  JDrawKeyListener keyListener
          The overall JDrawKeyListener.
protected  javax.swing.JToolBar toolBar
          The JToolBar is the main component of this view Class
protected  Tools tools
          Local reference to the Top-Level Tools Model object
 
Fields inherited from class mvp.View
editable, model, screen, shown, widget, window
 
Constructor Summary
ToolsPalette(mvp.Screen screen, Tools tools, JDrawKeyListener keyListener)
          Construct this with the given Tools object.
 
Method Summary
 void addButtons()
          Adds the buttons to the tools panel.
 java.awt.Component compose()
          Compose this by first composing the window for the Tools Bar.
 Tools getTools()
          Method getTools() returns this.tools.
 
Methods inherited from class mvp.View
getModel, getWidget, getWindow, hide, isEditable, isShown, run, setEditable, setModel, show, show, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tools

protected Tools tools
Local reference to the Top-Level Tools Model object

toolBar

protected javax.swing.JToolBar toolBar
The JToolBar is the main component of this view Class

keyListener

protected JDrawKeyListener keyListener
The overall JDrawKeyListener.
Constructor Detail

ToolsPalette

public ToolsPalette(mvp.Screen screen,
                    Tools tools,
                    JDrawKeyListener keyListener)
Construct this with the given Tools object.
Method Detail

compose

public java.awt.Component compose()
Compose this by first composing the window for the Tools Bar. Then Add the buttons and set the window properties.
Overrides:
compose in class mvp.View

addButtons

public void addButtons()
Adds the buttons to the tools panel.

getTools

public Tools getTools()
Method getTools() returns this.tools.