lcarsbeans
Class LcarsHCircle

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Canvas
              |
              +--lcarsbeans.LcarsHCircle

public class LcarsHCircle
extends java.awt.Canvas
implements java.io.Serializable

A filled half circle (design element).

Version:
0.9b, January 2002 (March 2001)
Author:
Andrei Scheibner, www.buffalo-as.de, andrei@buffalo-as.de
See Also:
Serialized Form

Inner classes inherited from class java.awt.Component
java.awt.Component.AWTTreeLock
 
Field Summary
static int caBottom
          The "bottom line" of the half circle at the bottom.
static int caLeft
          The "bottom line" of the half circle at the left side.
static int caRight
          The "bottom line" of the half circle at the right side.
static int caTop
          The "bottom line" of the half circle at the top.
 
Fields inherited from class java.awt.Component
actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, componentListener, componentListenerK, componentOrientation, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, hasFocus, height, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowListenerK, x, y
 
Constructor Summary
LcarsHCircle()
          Constructs a new instance.
 
Method Summary
 int getHCircleAlign()
          Returns the alignment of the half circle.
 java.awt.Dimension getPreferredSize()
          Returns the preferred size of the component.
 void paint(java.awt.Graphics g)
          Paints the control.
 void setHCircleAlign(int newHCircleAlign)
          Sets the alignment of the half circle.
Possible values: caTop, caRight, caBottom, caLeft
If the new value is not in the range between 0 and 3 the property is set to caRight.
 void update(java.awt.Graphics g)
          An overwritten and because of this almost flicker-free version of update().
 
Methods inherited from class java.awt.Canvas
, addNotify, constructComponentName, postsOldMouseEvents
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, dispatchEventImpl, doLayout, enable, enable, enableEvents, enableInputMethods, eventEnabled, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkit, getToolkitImpl, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, lightweightPrint, 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, processEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, 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
 

Field Detail

caTop

public static final int caTop
The "bottom line" of the half circle at the top.

caRight

public static final int caRight
The "bottom line" of the half circle at the right side.

caBottom

public static final int caBottom
The "bottom line" of the half circle at the bottom.

caLeft

public static final int caLeft
The "bottom line" of the half circle at the left side.
Constructor Detail

LcarsHCircle

public LcarsHCircle()
Constructs a new instance.
Method Detail

paint

public void paint(java.awt.Graphics g)
Paints the control.
Overrides:
paint in class java.awt.Canvas

update

public void update(java.awt.Graphics g)
An overwritten and because of this almost flicker-free version of update().
Overrides:
update in class java.awt.Component

getPreferredSize

public java.awt.Dimension getPreferredSize()
Returns the preferred size of the component.
Overrides:
getPreferredSize in class java.awt.Component

getHCircleAlign

public int getHCircleAlign()
Returns the alignment of the half circle.

setHCircleAlign

public void setHCircleAlign(int newHCircleAlign)
Sets the alignment of the half circle.
Possible values: caTop, caRight, caBottom, caLeft
If the new value is not in the range between 0 and 3 the property is set to caRight.