lcarsbeans
Class LcarsEdge

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

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

An edge (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 epBottomLeft
          The edge is in the lower left corner.
static int epBottomRight
          The edge is in the lower right corner.
static int epTopLeft
          The edge is in the upper left corner.
static int epTopRight
          The edge is in the upper right corner.
 
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
LcarsEdge()
          Constructs a new instance.
 
Method Summary
 int getEdgePosition()
          Returns the position of the edge.
 int getInnerRadiusX()
          Returns the radius in X direction of the inner side of the edge.
 int getInnerRadiusY()
          Returns the radius in Y direction of the inner side of the edge.
 int getOuterRadiusX()
          Returns the radius in X direction of the outer side of the edge.
 int getOuterRadiusY()
          Returns the radius in Y direction of the outer side of the edge.
 java.awt.Dimension getPreferredSize()
          Returns the preferred size of the component.
 int getThicknessX()
          Returns the horizontal thickness of the edge.
 int getThicknessY()
          Returns the vertical thickness of the edge.
 boolean isInnerFilled()
          Returns whether the inner of the edge is drawn using the background color.
 void paint(java.awt.Graphics g)
          Paints the control.
 void setEdgePosition(int newEdgePosition)
          Sets the position of the edge.
Possible values: epTopLeft, epTopRight, epBottomRight, epBottomLeft
If the new value is not in the range between 0 and 3 the property is set to epTopLeft.
 void setInnerFilled(boolean newInnerFilled)
          Sets whether the inner of the edge is drawn using the background color.
 void setInnerRadiusX(int newInnerRadiusX)
          Sets the radius in X direction of the inner side of the edge.
 void setInnerRadiusY(int newInnerRadiusY)
          Sets the radius in Y direction of the inner side of the edge.
 void setOuterRadiusX(int newOuterRadiusX)
          Sets the radius in X direction of the outer side of the edge.
 void setOuterRadiusY(int newOuterRadiusY)
          Sets the radius in Y direction of the outer side of the edge.
 void setThicknessX(int newThicknessX)
          Sets the horizontal thickness of the edge.
 void setThicknessY(int newThicknessY)
          Sets the vertical thickness of the edge.
 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

epTopLeft

public static final int epTopLeft
The edge is in the upper left corner.

epTopRight

public static final int epTopRight
The edge is in the upper right corner.

epBottomRight

public static final int epBottomRight
The edge is in the lower right corner.

epBottomLeft

public static final int epBottomLeft
The edge is in the lower left corner.
Constructor Detail

LcarsEdge

public LcarsEdge()
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

getEdgePosition

public int getEdgePosition()
Returns the position of the edge.

setEdgePosition

public void setEdgePosition(int newEdgePosition)
Sets the position of the edge.
Possible values: epTopLeft, epTopRight, epBottomRight, epBottomLeft
If the new value is not in the range between 0 and 3 the property is set to epTopLeft.

isInnerFilled

public boolean isInnerFilled()
Returns whether the inner of the edge is drawn using the background color.

setInnerFilled

public void setInnerFilled(boolean newInnerFilled)
Sets whether the inner of the edge is drawn using the background color.

getThicknessX

public int getThicknessX()
Returns the horizontal thickness of the edge.

setThicknessX

public void setThicknessX(int newThicknessX)
Sets the horizontal thickness of the edge.

getThicknessY

public int getThicknessY()
Returns the vertical thickness of the edge.

setThicknessY

public void setThicknessY(int newThicknessY)
Sets the vertical thickness of the edge.

getInnerRadiusX

public int getInnerRadiusX()
Returns the radius in X direction of the inner side of the edge.

setInnerRadiusX

public void setInnerRadiusX(int newInnerRadiusX)
Sets the radius in X direction of the inner side of the edge.

getInnerRadiusY

public int getInnerRadiusY()
Returns the radius in Y direction of the inner side of the edge.

setInnerRadiusY

public void setInnerRadiusY(int newInnerRadiusY)
Sets the radius in Y direction of the inner side of the edge.

getOuterRadiusX

public int getOuterRadiusX()
Returns the radius in X direction of the outer side of the edge.

setOuterRadiusX

public void setOuterRadiusX(int newOuterRadiusX)
Sets the radius in X direction of the outer side of the edge.

getOuterRadiusY

public int getOuterRadiusY()
Returns the radius in Y direction of the outer side of the edge.

setOuterRadiusY

public void setOuterRadiusY(int newOuterRadiusY)
Sets the radius in Y direction of the outer side of the edge.