org.nakedobjects.plugins.dnd.viewer.view.simple
Class Icon

java.lang.Object
  extended by org.nakedobjects.plugins.dnd.viewer.view.simple.AbstractView
      extended by org.nakedobjects.plugins.dnd.viewer.view.simple.ObjectView
          extended by org.nakedobjects.plugins.dnd.viewer.view.simple.Icon
All Implemented Interfaces:
java.lang.Cloneable, View
Direct Known Subclasses:
ServiceIcon

public class Icon
extends ObjectView


Field Summary
 
Fields inherited from interface org.nakedobjects.plugins.dnd.View
HPADDING, VPADDING
 
Constructor Summary
Icon(Content content, ViewSpecification specification, ViewAxis axis)
           
 
Method Summary
 void draw(Canvas canvas)
          Called by the frame, or the parent view, when this view must redraw itself.
 void entered()
          Called as the mouse crosses the bounds, and ends up inside, of this view.
 void exited()
          Called as the mouse crosses the bounds, and ends up outside, of this view.
 int getBaseline()
           
 Size getMaximumSize()
           
 void setSelectedIcon(IconGraphic selectedGraphic)
          Set up the graphic to be used when displaying the icon and the icon is selected.
 void setTitle(ObjectTitleText text)
          Set up the title to be used when displaying the icon.
 void setUnselectedGraphic(IconGraphic unselectedGraphic)
          Set up the graphic to be used when displaying the icon and the icon is unselected.
 void setVertical(boolean isVertical)
          Specifies if the graphic should be aligned vertical above the label; otherwise aligned horizontally.
 void update(NakedObject object)
          notification that the content of this view has changed
 
Methods inherited from class org.nakedobjects.plugins.dnd.viewer.view.simple.ObjectView
contentMenuOptions, dragIn, dragOut, dragStart, drop, firstClick, invalidateContent, secondClick
 
Methods inherited from class org.nakedobjects.plugins.dnd.viewer.view.simple.AbstractView
addView, assignId, canChangeValue, canFocus, contains, containsFocus, debug, debugStructure, dispose, drag, drag, dragCancel, dragFrom, dragTo, drop, editComplete, focusLost, focusReceived, getAbsoluteLocation, getBounds, getContent, getFeedbackManager, getFocusManager, getId, getLocation, getPadding, getParent, getRequiredSize, getSize, getSpecification, getState, getSubviews, getView, getViewAxis, getViewManager, getWorkspace, hasFocus, identify, invalidateLayout, keyPressed, keyReleased, keyTyped, layout, limitBoundsWithin, limitBoundsWithin, markDamaged, markDamaged, mouseDown, mouseMoved, mouseUp, objectActionResult, pickupContent, pickupView, print, refresh, removeView, replaceOptions, replaceView, setBounds, setContent, setFocusManager, setLocation, setMaximumSize, setParent, setSize, setSpecification, setView, setViewAxis, subviewFor, thirdClick, toString, updateView, viewAreaType, viewMenuOptions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Icon

public Icon(Content content,
            ViewSpecification specification,
            ViewAxis axis)
Method Detail

draw

public void draw(Canvas canvas)
Description copied from interface: View
Called by the frame, or the parent view, when this view must redraw itself.

Specified by:
draw in interface View
Overrides:
draw in class AbstractView

entered

public void entered()
Description copied from interface: View
Called as the mouse crosses the bounds, and ends up inside, of this view. Is also called as the mouse returns into this view from a contained view.

Specified by:
entered in interface View
Overrides:
entered in class AbstractView

exited

public void exited()
Description copied from interface: View
Called as the mouse crosses the bounds, and ends up outside, of this view.

Specified by:
exited in interface View
Overrides:
exited in class AbstractView

getBaseline

public int getBaseline()
Specified by:
getBaseline in interface View
Overrides:
getBaseline in class AbstractView

getMaximumSize

public Size getMaximumSize()
Specified by:
getMaximumSize in interface View
Overrides:
getMaximumSize in class AbstractView

setSelectedIcon

public void setSelectedIcon(IconGraphic selectedGraphic)
Set up the graphic to be used when displaying the icon and the icon is selected.


setTitle

public void setTitle(ObjectTitleText text)
Set up the title to be used when displaying the icon.


setUnselectedGraphic

public void setUnselectedGraphic(IconGraphic unselectedGraphic)
Set up the graphic to be used when displaying the icon and the icon is unselected. If this returns null the graphic will not be changed when the icon becomes unselected.


setVertical

public void setVertical(boolean isVertical)
Specifies if the graphic should be aligned vertical above the label; otherwise aligned horizontally.


update

public void update(NakedObject object)
Description copied from interface: View
notification that the content of this view has changed

Specified by:
update in interface View
Overrides:
update in class AbstractView


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.