Class symantec.itools.awt.shape.Line
All Packages Class Hierarchy This Package Previous Next Index
Class symantec.itools.awt.shape.Line
Object
|
+----Component
|
+----symantec.itools.awt.shape.Line
- public class Line
- extends Component
Implements a line than can have a thickness.
- Version:
- 1.1, July 30, 1997
- Author:
- Symantec
-
lineThickness
- The thickness of the line to draw.
-
poly
- The polygon that defines the line when lineThickness is larger than 1.
-
slopeType
- The slope type of the line to be drawn (either positive (true) or negative (false)).
-
symantec.itools.awt.shape.Line()
- Constructs a default Line with positive slope and thickness of 1 pixel.
-
addPropertyChangeListener(PropertyChangeListener)
- Adds a listener for all property change events.
-
addVetoableChangeListener(VetoableChangeListener)
- Adds a listener for all vetoable property change events.
-
contains(int, int)
- Checks whether this component "contains" the specified (x, y)
location, where x and y are defined to be relative to the
coordinate system of this component.
-
getLineThickness()
- Gets the thickness of the line to draw.
-
getMinimumSize()
- Returns the minimum dimensions to properly display this component.
-
getPreferredSize()
- Returns the recommended dimensions to properly display this component.
-
isPositiveSlope()
- Gets the slope type of the line to draw.
-
paint(Graphics)
- Paints the line using the given graphics context.
-
removePropertyChangeListener(PropertyChangeListener)
- Removes a listener for all property change events.
-
removeVetoableChangeListener(VetoableChangeListener)
- Removes a listener for all vetoable property change events.
-
setLineThickness(int)
- Sets the thikcness of the line to draw.
-
setPositiveSlope(boolean)
- Sets the slope type of the line to draw.
lineThickness
protected int lineThickness
- The thickness of the line to draw.
poly
protected java.awt.Polygon poly
- The polygon that defines the line when lineThickness is larger than 1.
slopeType
protected boolean slopeType
- The slope type of the line to be drawn (either positive (true) or negative (false)).
Line
public Line()
- Constructs a default Line with positive slope and thickness of 1 pixel.
addPropertyChangeListener
public synchronized void addPropertyChangeListener(PropertyChangeListener listener)
- Adds a listener for all property change events.
- Parameters:
- listener - the listener to add
- See Also:
- removePropertyChangeListener
addVetoableChangeListener
public synchronized void addVetoableChangeListener(VetoableChangeListener listener)
- Adds a listener for all vetoable property change events.
- Parameters:
- listener - the listener to add
- See Also:
- removeVetoableChangeListener
contains
public boolean contains(int x,
int y)
- Checks whether this component "contains" the specified (x, y)
location, where x and y are defined to be relative to the
coordinate system of this component.
- Parameters:
- x - the x coordinate
- y - the y coordinate
- Overrides:
- contains in class Component
- See Also:
- getComponentAt
getLineThickness
public int getLineThickness()
- Gets the thickness of the line to draw.
- Returns:
- the thickness of the line in pixels
- See Also:
- setLineThickness
getMinimumSize
public java.awt.Dimension getMinimumSize()
- Returns the minimum dimensions to properly display this component.
This is a standard Java AWT method which gets called to determine
the minimum size of this component.
Returns the results of a call to getPreferredSize.
- Overrides:
- getMinimumSize in class Component
- See Also:
- getPreferredSize
getPreferredSize
public java.awt.Dimension getPreferredSize()
- Returns the recommended dimensions to properly display this component.
This is a standard Java AWT method which gets called to determine
the recommended size of this component.
- Returns:
- horiziontal and vertical dimensions of 50, 50
- Overrides:
- getPreferredSize in class Component
- See Also:
- minimumSize
isPositiveSlope
public boolean isPositiveSlope()
- Gets the slope type of the line to draw.
- Returns:
- true if the line will be drawn from the lowwer left corner to the
upper right corner. false if the line will be drawn from the upper left
corner to the bottom right corner.
- See Also:
- setPositiveSlope
paint
public void paint(Graphics g)
- Paints the line using the given graphics context.
This is a standard Java AWT method which typically gets called
by the AWT to handle painting this component. It paints this component
using the given graphics context. The graphics context clipping region
is set to the bounding rectangle of this component and its <0,0>
coordinate is this component's top-left corner.
- Parameters:
- g - the graphics context used for painting
- Overrides:
- paint in class Component
- See Also:
- repaint, update
removePropertyChangeListener
public synchronized void removePropertyChangeListener(PropertyChangeListener listener)
- Removes a listener for all property change events.
- Parameters:
- listener - the listener to remove
- See Also:
- addPropertyChangeListener
removeVetoableChangeListener
public synchronized void removeVetoableChangeListener(VetoableChangeListener listener)
- Removes a listener for all vetoable property change events.
- Parameters:
- listener - the listener to remove
- See Also:
- addVetoableChangeListener
setLineThickness
public void setLineThickness(int thickness) throws PropertyVetoException
- Sets the thikcness of the line to draw.
- Parameters:
- thickness - the thickness of the line in pixels
- Throws: PropertyVetoException
- if the specified property value is unacceptable
- See Also:
- getLineThickness
setPositiveSlope
public void setPositiveSlope(boolean type) throws PropertyVetoException
- Sets the slope type of the line to draw.
- Parameters:
- type - if the type is true the line will be drawn from
the lowwer left corner to the upper right corner. If the type is false,
the line will be drawn from the upper left corner to the bottom right corner.
- Throws: PropertyVetoException
- if the specified property value is unacceptable
- See Also:
- isPositiveSlope
All Packages Class Hierarchy This Package Previous Next Index