NetCharts Pro

netcharts.pro.common
Class NFCorners

java.lang.Object
  extended by netcharts.pro.common.NFBaseClass
      extended by netcharts.pro.common.NFCorners
All Implemented Interfaces:
java.lang.Cloneable, NFCDLGenerator

public class NFCorners
extends NFBaseClass
implements NFCDLGenerator

A class representing the corners of a rectangular shape.


Field Summary
static int CORNER_ROUND
          Round border corner style
static int CORNER_SNIP
          Snip border corner style
static int CORNER_SQUARE
          Square border corner style
static double DEFAULT_CORNER_SIZE
           
static int DEFAULT_CORNER_TYPE
           
 
Constructor Summary
NFCorners()
           
 
Method Summary
 double getBottomLeftCornerSize()
          Get the bottom left corner size.
 int getBottomLeftCornerType()
          Gets the bottom left corner type.
 double getBottomRightCornerSize()
          Get the bottom right corner size.
 int getBottomRightCornerType()
          Gets the bottom right corner type.
 java.lang.String getCDL()
          Generate CDL parameters representing this region
 void getCDL(java.lang.StringBuffer sb)
          Append CDL parameters representing these corners to the given StringBuffer.
 double getTopLeftCornerSize()
          Get the top left corner size.
 int getTopLeftCornerType()
          Gets the top left corner type.
 double getTopRightCornerSize()
          Get the top right corner size.
 int getTopRightCornerType()
          Gets the top right corner type.
 void setBottomLeftCornerSize(double bottomLeftCornerSize)
          Set the bottom left corner size.
 void setBottomLeftCornerType(int bottomLeftCornerType)
          Sets the bottom left corner type.
 void setBottomRightCornerSize(double bottomRightCornerSize)
          Set the bottom right corner size.
 void setBottomRightCornerType(int bottomRightCornerType)
          Sets the bottom right corner type.
 void setCDL(java.lang.Object cdlObject)
          Configures this object from a CDL parameter object.
 void setCDL(java.lang.String cdl)
          Configures this object from a CDL parameter representation.
 int setCDL(java.lang.String[] elements, int offset)
          Configures this object from a CDL parameter representation.
 void setTopLeftCornerSize(double topLeftCornerSize)
          Set the top left corner size.
 void setTopLeftCornerType(int topLeftCornerType)
          Sets the top left corner type.
 void setTopRightCornerSize(double topRightCornerSize)
          Set the top right corner size.
 void setTopRightCornerType(int topRightCornerType)
          Sets the top right corner type.
 
Methods inherited from class netcharts.pro.common.NFBaseClass
clone, getModified, getUserObject, setModified, setUserObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface netcharts.pro.common.NFCDLGenerator
toString
 

Field Detail

CORNER_SQUARE

public static final int CORNER_SQUARE
Square border corner style


CORNER_ROUND

public static final int CORNER_ROUND
Round border corner style


CORNER_SNIP

public static final int CORNER_SNIP
Snip border corner style


DEFAULT_CORNER_TYPE

public static final int DEFAULT_CORNER_TYPE

DEFAULT_CORNER_SIZE

public static final double DEFAULT_CORNER_SIZE
Constructor Detail

NFCorners

public NFCorners()
Method Detail

getTopLeftCornerSize

public double getTopLeftCornerSize()
Get the top left corner size. This size is used for ROUND and SNIP corner styles. A fractional value between 0 and 1 represents the percentage of the width of the cornered object to use as the top left corner size. A non fractional value greater than or equal to 1 represents the number of pixels to use for the top left corner size.

Returns:
The top left corner size as a percentage or number of pixels.

setTopLeftCornerSize

public void setTopLeftCornerSize(double topLeftCornerSize)
Set the top left corner size. This size is used for ROUND and SNIP corner styles. A fractional value between 0 and 1 represents the percentage of the width of the cornered object to use as the top left corner size. A non fractional value greater than or equal to 1 represents the number of pixels to use for the top left corner size.

Parameters:
topLeftCornerSize - The top left corner size as a percentage or number of pixels.

getTopLeftCornerType

public int getTopLeftCornerType()
Gets the top left corner type.

Returns:
The top left corner type

setTopLeftCornerType

public void setTopLeftCornerType(int topLeftCornerType)
Sets the top left corner type. If the value passed is not a valid corner type an IllegalArgumentException will be thrown.

Parameters:
topLeftCornerType - The top left corner type

getTopRightCornerSize

public double getTopRightCornerSize()
Get the top right corner size. This size is used for ROUND and SNIP corner styles. A fractional value between 0 and 1 represents the percentage of the width of the cornered object to use as the top right corner size. A non fractional value greater than or equal to 1 represents the number of pixels to use for the top right corner size.

Returns:
The top right corner size as a percentage or number of pixels.

setTopRightCornerSize

public void setTopRightCornerSize(double topRightCornerSize)
Set the top right corner size. This size is used for ROUND and SNIP corner styles. A fractional value between 0 and 1 represents the percentage of the width of the cornered object to use as the top right corner size. A non fractional value greater than or equal to 1 represents the number of pixels to use for the top right corner size.

Parameters:
topLeftCornerSize - The top right corner size as a percentage or number of pixels.

getTopRightCornerType

public int getTopRightCornerType()
Gets the top right corner type.

Returns:
The top right corner type

setTopRightCornerType

public void setTopRightCornerType(int topRightCornerType)
Sets the top right corner type. If the value passed is not a valid corner type an IllegalArgumentException will be thrown.

Parameters:
topRightCornerType - The top right corner type

getBottomLeftCornerSize

public double getBottomLeftCornerSize()
Get the bottom left corner size. This size is used for ROUND and SNIP corner styles. A fractional value between 0 and 1 represents the percentage of the width of the cornered object to use as the bottom left corner size. A non fractional value greater than or equal to 1 represents the number of pixels to use for the bottom left corner size.

Returns:
The bottom left corner size as a percentage or number of pixels.

setBottomLeftCornerSize

public void setBottomLeftCornerSize(double bottomLeftCornerSize)
Set the bottom left corner size. This size is used for ROUND and SNIP corner styles. A fractional value between 0 and 1 represents the percentage of the width of the cornered object to use as the bottom left corner size. A non fractional value greater than or equal to 1 represents the number of pixels to use for the bottom left corner size.

Parameters:
bottomLeftCornerSize - The bottom left corner size as a percentage or number of pixels.

getBottomLeftCornerType

public int getBottomLeftCornerType()
Gets the bottom left corner type.

Returns:
The bottom left corner type

setBottomLeftCornerType

public void setBottomLeftCornerType(int bottomLeftCornerType)
Sets the bottom left corner type. If the value passed is not a valid corner type an IllegalArgumentException will be thrown.

Parameters:
bottomLeftCornerType - The bottom left corner type

getBottomRightCornerSize

public double getBottomRightCornerSize()
Get the bottom right corner size. This size is used for ROUND and SNIP corner styles. A fractional value between 0 and 1 represents the percentage of the width of the cornered object to use as the bottom right corner size. A non fractional value greater than or equal to 1 represents the number of pixels to use for the bottom right corner size.

Returns:
The bottom right corner size as a percentage or number of pixels.

setBottomRightCornerSize

public void setBottomRightCornerSize(double bottomRightCornerSize)
Set the bottom right corner size. This size is used for ROUND and SNIP corner styles. A fractional value between 0 and 1 represents the percentage of the width of the cornered object to use as the bottom right corner size. A non fractional value greater than or equal to 1 represents the number of pixels to use for the bottom right corner size.

Parameters:
bottomLeftCornerSize - The bottom right corner size as a percentage or number of pixels.

getBottomRightCornerType

public int getBottomRightCornerType()
Gets the bottom right corner type.

Returns:
The bottom right corner type

setBottomRightCornerType

public void setBottomRightCornerType(int bottomRightCornerType)
Sets the bottom right corner type. If the value passed is not a valid corner type an IllegalArgumentException will be thrown.

Parameters:
bottomRightCornerType - The bottom right corner type

getCDL

public java.lang.String getCDL()
Generate CDL parameters representing this region

Specified by:
getCDL in interface NFCDLGenerator
Returns:
CDL in the form: (topleft, topright, bottomright, bottomleft)

getCDL

public void getCDL(java.lang.StringBuffer sb)
Append CDL parameters representing these corners to the given StringBuffer.

Parameters:
sb - Target buffer to append the CDL parameters

setCDL

public void setCDL(java.lang.Object cdlObject)
Configures this object from a CDL parameter object.

Parameters:
cdlObject - CDL in a String form or in a user object.

setCDL

public void setCDL(java.lang.String cdl)
Configures this object from a CDL parameter representation.

Specified by:
setCDL in interface NFCDLGenerator
Parameters:
cdl - CDL in the form: (topleft, topright, bottomright, bottomleft)

setCDL

public int setCDL(java.lang.String[] elements,
                  int offset)
Configures this object from a CDL parameter representation.

Parameters:
elements - Array of parameter elements. This array is expected to contain consecutive elements containing (topleft, topright, bottomright, bottomleft)
offset - Offset into the elements array.

NetCharts Pro


Visual Mining, Inc.
2099 Gaither Rd.
Suite 220
Rockville, MD 20850
800.308.0731
301.947.8293 FAX

Copyright © Visual Mining, Inc. 1996 - 2011
All Rights Reserved.

NetCharts Pro TM is a registered trademark of Visual Mining, Inc. Other brands and their products are trademarks of their respective holders.

Last Modified: Jun 28, 2011