# NonGeometricData (Slick - The 2D Library)
Date: 2013-06-03

## org.newdawn.slick.svg
Class NonGeometricData

    java.lang.Object
      org.newdawn.slick.svg.NonGeometricData

Direct Known Subclasses:
  InkscapeNonGeometricData

    public class NonGeometricData

extends java.lang.Object

A set of data about a shape that doesn't fit into it's geometric configuration.

Author:
  kevin

Field Summary
`static java.lang.String` `FILL` The fill type
`static java.lang.String` `ID` The ID of the figure
`static java.lang.String` `NONE` Value indicating that no settings has been specified
`static java.lang.String` `OPACITY` The alpha value for filling
`static java.lang.String` `STROKE` The stroke type
`static java.lang.String` `STROKE_DASHARRAY` The dash definition of the line to draw
`static java.lang.String` `STROKE_DASHOFFSET` The offset into the dash definition of the line to draw
`static java.lang.String` `STROKE_MITERLIMIT` The mitre of the line to draw
`static java.lang.String` `STROKE_OPACITY` The alpha value for drawing
`static java.lang.String` `STROKE_WIDTH` The width of the line to draw

Constructor Summary
`NonGeometricData(java.lang.String metaData)` Create a set of non-geometric data for a figure

Method Summary
`void` `addAttribute(java.lang.String attribute, java.lang.String value)` Add a configured style attribute into the data set
`Color` `getAsColor(java.lang.String attribute)` Get an attribute value converted to a color.
`float` `getAsFloat(java.lang.String attribute)` Get an attribute converted to a float value
`java.lang.String` `getAsReference(java.lang.String attribute)` Get the attribute value as a reference to another entity
`java.lang.String` `getAttribute(java.lang.String attribute)` Get the attribtue value for a given attribute
`java.lang.String` `getMetaData()` Get the meta data assigned to the figure.
`boolean` `isColor(java.lang.String attribute)` Check if a given attribute is in colour format
`boolean` `isFilled()` True if the shape is meant to be filled
`boolean` `isStroked()` True if the shape is meant to be outlined

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ID

    public static final java.lang.String ID

  The ID of the figure

  See Also:
    Constant Field Values

### FILL

    public static final java.lang.String FILL

  The fill type

  See Also:
    Constant Field Values

### STROKE

    public static final java.lang.String STROKE

  The stroke type

  See Also:
    Constant Field Values

### OPACITY

    public static final java.lang.String OPACITY

  The alpha value for filling

  See Also:
    Constant Field Values

### STROKE_WIDTH

    public static final java.lang.String STROKE_WIDTH

  The width of the line to draw

  See Also:
    Constant Field Values

### STROKE_MITERLIMIT

    public static final java.lang.String STROKE_MITERLIMIT

  The mitre of the line to draw

  See Also:
    Constant Field Values

### STROKE_DASHARRAY

    public static final java.lang.String STROKE_DASHARRAY

  The dash definition of the line to draw

  See Also:
    Constant Field Values

### STROKE_DASHOFFSET

    public static final java.lang.String STROKE_DASHOFFSET

  The offset into the dash definition of the line to draw

  See Also:
    Constant Field Values

### STROKE_OPACITY

    public static final java.lang.String STROKE_OPACITY

  The alpha value for drawing

  See Also:
    Constant Field Values

### NONE

    public static final java.lang.String NONE

  Value indicating that no settings has been specified

  See Also:
    Constant Field Values

Constructor Detail

### NonGeometricData

    public NonGeometricData(java.lang.String metaData)

  Create a set of non-geometric data for a figure

  Parameters:
    `metaData` - The meta data (either label or id) for the figure

Method Detail

### addAttribute

    public void addAttribute(java.lang.String attribute,
                             java.lang.String value)

  Add a configured style attribute into the data set

  Parameters:
    `attribute` - The attribute to add
    `value` - The value to assign

### isColor

    public boolean isColor(java.lang.String attribute)

  Check if a given attribute is in colour format

  Parameters:
    `attribute` - The attribute to check
  Returns:
    True if the attirbute value is in colour format

### getMetaData

    public java.lang.String getMetaData()

  Get the meta data assigned to the figure. Either the label or the id value.

  Returns:
    The meta data assigned to the figure

### getAttribute

    public java.lang.String getAttribute(java.lang.String attribute)

  Get the attribtue value for a given attribute

  Parameters:
    `attribute` - The attribute whose value should be obtained
  Returns:
    The value for the given attribute

### getAsColor

    public Color getAsColor(java.lang.String attribute)

  Get an attribute value converted to a color. isColor should first be checked

  Parameters:
    `attribute` - The attribute whose value should be interpreted as a color
  Returns:
    The color based on the attribute

### getAsReference

    public java.lang.String getAsReference(java.lang.String attribute)

  Get the attribute value as a reference to another entity

  Parameters:
    `attribute` - The name of the attribute to retrieve
  Returns:
    The reference part of the attribute value

### getAsFloat

    public float getAsFloat(java.lang.String attribute)

  Get an attribute converted to a float value

  Parameters:
    `attribute` - The attribute to retrieve
  Returns:
    The float value derived from the attribute

### isFilled

    public boolean isFilled()

  True if the shape is meant to be filled

  Returns:
    True if the shape is meant to be filled

### isStroked

    public boolean isStroked()

  True if the shape is meant to be outlined

  Returns:
    True if the shape is meant to be outlined

Copyright © 2006 New Dawn Software. All Rights Reserved.