org.havi.ui
Class HStaticIcon

java.lang.Object
  extended byjava.awt.Component
      extended byorg.havi.ui.HComponent
          extended byorg.havi.ui.HVisible
              extended byorg.havi.ui.HStaticIcon
All Implemented Interfaces:
HMatteLayer, HNoInputPreferred, HState, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, TestOpacity
Direct Known Subclasses:
HIcon

public class HStaticIcon
extends HVisible
implements HNoInputPreferred

The HStaticIcon is a user interface component used to display static graphical content which does not permit the user to navigate (focus) upon it. By default it uses the HGraphicLook to render itself.


The parameters to the constructors are as follows, in cases where parameters are not used, then the constructor should use the default values.

Default parameter values exposed in the constructors

ParameterDescriptionDefault value Set methodGet method
x x-coordinate of top left hand corner of this component in pixels, relative to its parent container (subject to layout management). --- java.awt.Component#setBounds java.awt.Component#getBounds
y y-coordinate of top left hand corner of this component in pixels, relative to its parent container (subject to layout management). --- java.awt.Component#setBounds java.awt.Component#getBounds
width width of this component in pixels (subject to layout management). --- java.awt.Component#setBounds java.awt.Component#getBounds
height height of this component in pixels (subject to layout management). --- java.awt.Component#setBounds java.awt.Component#getBounds
imageNormal The image to be used as the content for the HState.NORMAL_STATE state of this component. null setGraphicContent getGraphicContent

Default parameter values not exposed in the constructors

DescriptionDefault valueSet method Get method
Associated matte (HMatte). none (i.e. getMatte() returns null) setMatte getMatte
The text layout manager responsible for text formatting. An HDefaultTextLayoutManager object. HVisible.setTextLayoutManager(org.havi.ui.HTextLayoutManager) HVisible.getTextLayoutManager()
The background painting mode HVisible.NO_BACKGROUND_FILL HVisible.setBackgroundMode(int) HVisible.getBackgroundMode()
The default preferred size not set (i.e. NO_DEFAULT_SIZE) unless specified by width and height parameters HVisible.setDefaultSize(java.awt.Dimension) HVisible.getDefaultSize()
The horizontal content alignment HVisible.HALIGN_CENTER HVisible.setHorizontalAlignment(int) HVisible.getHorizontalAlignment()
The vertical content alignment HVisible.VALIGN_CENTER HVisible.setVerticalAlignment(int) HVisible.getVerticalAlignment()
The content scaling mode HVisible.RESIZE_NONE HVisible.setResizeMode(int) HVisible.getResizeMode()
The border mode true HVisible.setBordersEnabled(boolean) HVisible.getBordersEnabled()
The default "look" for this class. A platform specific HGraphicLook HStaticIcon.setDefaultLook HStaticIcon.getDefaultLook
The "look" for this object. The HGraphicLook returned from HStaticIcon.getDefaultLook when this object was created. HStaticIcon.setLook HStaticIcon.getLook

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.havi.ui.HVisible
ADJUSTMENT_VALUE_CHANGE, ANIMATE_CONTENT_CHANGE, ANIMATION_POSITION_CHANGE, BACKGROUND_FILL, BORDER_CHANGE, CARET_POSITION_CHANGE, CONTENT_CHANGE, ECHO_CHAR_CHANGE, EDIT_MODE_CHANGE, FIRST_CHANGE, GRAPHIC_CONTENT_CHANGE, HALIGN_CENTER, HALIGN_JUSTIFY, HALIGN_LEFT, HALIGN_RIGHT, ITEM_VALUE_CHANGE, LAST_CHANGE, LIST_CONTENT_CHANGE, LIST_ICONSIZE_CHANGE, LIST_LABELSIZE_CHANGE, LIST_MULTISELECTION_CHANGE, LIST_SCROLLPOSITION_CHANGE, LIST_SELECTION_CHANGE, MIN_MAX_CHANGE, NO_BACKGROUND_FILL, NO_DEFAULT_HEIGHT, NO_DEFAULT_SIZE, NO_DEFAULT_WIDTH, ORIENTATION_CHANGE, REPEAT_COUNT_CHANGE, RESIZE_ARBITRARY, RESIZE_NONE, RESIZE_PRESERVE_ASPECT, SIZE_CHANGE, STATE_CHANGE, TEXT_CONTENT_CHANGE, TEXT_VALUE_CHANGE, THUMB_OFFSETS_CHANGE, UNKNOWN_CHANGE, VALIGN_BOTTOM, VALIGN_CENTER, VALIGN_JUSTIFY, VALIGN_TOP
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface org.havi.ui.HState
ACTIONED_FOCUSED_STATE, ACTIONED_STATE, ACTIONED_STATE_BIT, ALL_STATES, DISABLED_ACTIONED_FOCUSED_STATE, DISABLED_ACTIONED_STATE, DISABLED_FOCUSED_STATE, DISABLED_STATE, DISABLED_STATE_BIT, FIRST_STATE, FOCUSED_STATE, FOCUSED_STATE_BIT, LAST_STATE, NORMAL_STATE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
HStaticIcon()
          Creates an HStaticIcon object.
HStaticIcon(java.awt.Image imageNormal)
          Creates an HStaticIcon object.
HStaticIcon(java.awt.Image imageNormal, int x, int y, int width, int height)
          Creates an HStaticIcon object.
 
Method Summary
static HGraphicLook getDefaultLook()
          Returns the currently set default HLook for HStaticIcon components.
static void setDefaultLook(HGraphicLook hlook)
          Sets the default HLook for further HStaticIcon Components.
 void setLook(HLook hlook)
          Sets the HLook for this component.
 
Methods inherited from class org.havi.ui.HVisible
getAnimateContent, getBackgroundMode, getBordersEnabled, getContent, getDefaultSize, getGraphicContent, getHorizontalAlignment, getInteractionState, getLook, getLookData, getMaximumSize, getMinimumSize, getPreferredSize, getResizeMode, getTextContent, getTextLayoutManager, getVerticalAlignment, isFocusTraversable, isOpaque, paint, setAnimateContent, setBackgroundMode, setBordersEnabled, setContent, setDefaultSize, setEnabled, setGraphicContent, setHorizontalAlignment, setInteractionState, setLookData, setResizeMode, setTextContent, setTextLayoutManager, setVerticalAlignment, update
 
Methods inherited from class org.havi.ui.HComponent
getMatte, isDoubleBuffered, isEnabled, processEvent, setMatte
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, bounds, checkImage, checkImage, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, getAlignmentX, getAlignmentY, getBackground, getBounds, getColorModel, getComponentAt, getComponentAt, getCursor, getFont, getFontMetrics, getForeground, getGraphics, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hide, imageUpdate, inside, invalidate, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processFocusEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setCursor, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HStaticIcon

public HStaticIcon()
Creates an HStaticIcon object. See the class description for details of constructor parameters and default values. For constructors which specify content as parameters, see 'State-based content' in HVisible for unspecified content associated with other HStates.


HStaticIcon

public HStaticIcon(java.awt.Image imageNormal,
                   int x,
                   int y,
                   int width,
                   int height)
Creates an HStaticIcon object. See the class description for details of constructor parameters and default values. For constructors which specify content as parameters, see 'State-based content' in HVisible for unspecified content associated with other HStates.


HStaticIcon

public HStaticIcon(java.awt.Image imageNormal)
Creates an HStaticIcon object. See the class description for details of constructor parameters and default values. For constructors which specify content as parameters, see 'State-based content' in HVisible for unspecified content associated with other HStates.

Method Detail

setLook

public void setLook(HLook hlook)
             throws HInvalidLookException
Sets the HLook for this component.

Overrides:
setLook in class HVisible
Parameters:
hlook - The HLook that is to be used for this component. Note that this parameter may be null, in which case the component will not draw itself until a look is set.
Throws:
HInvalidLookException - If the HLook is not an HGraphicLook.

setDefaultLook

public static void setDefaultLook(HGraphicLook hlook)
Sets the default HLook for further HStaticIcon Components.

Parameters:
hlook - The HLook that will be used by default when creating a new HStaticIcon component. Note that this parameter may be null, in which case newly created components shall not draw themselves until a non-null look is set using the setLook method.

getDefaultLook

public static HGraphicLook getDefaultLook()
Returns the currently set default HLook for HStaticIcon components.

Returns:
The HLook that is used by default when creating a new HStaticIcon component.