|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.awt.Font
com.davisor.graphics.data.FontData
FontData objects represent a concrete font. FontData inherits Font, making it compatible with standard Java graphics tools. This makes FontData immutable, and any operations that would change the FontData value will therefore fail with an appropriate exception.
FontType,
Serialized Form| Field Summary | |
protected java.lang.Boolean |
M_scalable
Is font scalable or not. |
protected FontType |
M_type
The type of this data. |
| Fields inherited from class java.awt.Font |
BOLD, CENTER_BASELINE, HANGING_BASELINE, ITALIC, LAYOUT_LEFT_TO_RIGHT, LAYOUT_NO_LIMIT_CONTEXT, LAYOUT_NO_START_CONTEXT, LAYOUT_RIGHT_TO_LEFT, name, PLAIN, pointSize, ROMAN_BASELINE, size, style, TRUETYPE_FONT |
| Constructor Summary | |
FontData(FontData data,
boolean deep)
Deep or shallow copy constructor. |
|
FontData(FontType type,
java.awt.Font font)
Constructs a font data object from the given font type and value. |
|
FontData(FontType type,
java.awt.Font font,
java.lang.Boolean scalable)
Constructs a font data object from the given font type and value. |
|
FontData(FontType type,
java.lang.String font,
java.text.ParsePosition status,
java.awt.Font defaults)
Constructs a font data object from the given font type and string value. |
|
| Method Summary | |
DataValue |
abs()
Returns absolute data value of current value. |
DataValue |
add(DataValue value)
Adds data values. |
DataValue |
ceil(DataValue precision)
Quantizes the current value up to an even value within given precision. |
int |
compareTo(java.lang.Object o)
Compares this font with other font objects. |
double |
deinterpolate(DataValue min,
DataValue max)
De-interpolates the current data value to a scalar value, in respect, with the given data value range. |
DataValue |
div(DataValue value)
Divides current data value with given value. |
com.davisor.core.Dupable |
dup()
Makes a deep copy of this object. |
DataValue |
floor(DataValue precision)
Quantizes the current value down to an even value within given precision. |
java.lang.String |
getFormat()
Gets the type specification optimal for this particular value. |
Type |
getType()
Gets the data type. |
DataValue |
interpolate(double value,
DataValue max)
Interpolates the given scalar value to a data value, in respect, with the range defined by this value and the given maximum value. |
boolean |
isNull()
Tests if this data object value is undetermined. |
boolean |
isScalable()
|
DataValue |
max(DataValue value)
Finds the largest data value. |
DataValue |
min(DataValue value)
Finds the smallest data value. |
DataValue |
mul(DataValue value)
Multiplies current data value with given value. |
DataValue |
negate()
Returns the negation of current value. |
void |
setValue(java.lang.String value,
java.text.ParsePosition status)
Attempts to set the font value, but since fonts are immutable objects, this will always fail. |
DataValue |
sub(DataValue value)
Substracts a data value. |
void |
toStatement(java.sql.PreparedStatement statement,
int parameter)
Convert data to a prepared statement input parameter. |
java.lang.String |
toString()
Converts this font to a string. |
java.lang.String |
toXML()
Gets the XML string representation of this value. |
DataValue |
unit(DataValue targetValue,
double maxSteps)
Gets the largest suitable unit step to represent a value change between this value and the given target value. |
| Methods inherited from class java.awt.Font |
canDisplay, canDisplayUpTo, canDisplayUpTo, canDisplayUpTo, createFont, createGlyphVector, createGlyphVector, createGlyphVector, createGlyphVector, decode, deriveFont, deriveFont, deriveFont, deriveFont, deriveFont, deriveFont, equals, finalize, getAttributes, getAvailableAttributes, getBaselineFor, getFamily, getFamily, getFont, getFont, getFont, getFontName, getFontName, getItalicAngle, getLineMetrics, getLineMetrics, getLineMetrics, getLineMetrics, getMaxCharBounds, getMissingGlyphCode, getName, getNumGlyphs, getPeer, getPSName, getSize, getSize2D, getStringBounds, getStringBounds, getStringBounds, getStringBounds, getStyle, getTransform, hashCode, hasUniformLineMetrics, isBold, isItalic, isPlain, isTransformed, layoutGlyphVector |
| Methods inherited from class java.lang.Object |
clone, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected FontType M_type
protected java.lang.Boolean M_scalable
| Constructor Detail |
public FontData(FontData data,
boolean deep)
data - source datadeep - determine if the copying is deep or shallowgetType(),
Type.dup()
public FontData(FontType type,
java.awt.Font font)
type - custom font typefont - font value
public FontData(FontType type,
java.awt.Font font,
java.lang.Boolean scalable)
type - custom font typefont - font valuescalable - is font scalable or not (may be null)isScalable()
public FontData(FontType type,
java.lang.String font,
java.text.ParsePosition status,
java.awt.Font defaults)
throws InvalidDataException
type - custom font typefont - font valuestatus - parse statusdefaults - font to inherit default font values from (may be null)| Method Detail |
public int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparable
public Type getType()
throws InvalidDataException
getType in interface DataInvalidDataException - if type retrieval failspublic boolean isNull()
isNull in interface SerializableDataType.isNull(com.davisor.data.SerializableData)
public DataValue abs()
throws InvalidDataException
abs in interface DataValueInvalidDataException - if absolute value can not be computed
public DataValue add(DataValue value)
throws InvalidDataException
add in interface DataValuevalue - a data value to be added to this data value
InvalidDataException - if the data values cannot be added.public DataValue ceil(DataValue precision)
ceil in interface DataValueprecision - the precision within quantization occurs
floor(com.davisor.data.DataValue)
public double deinterpolate(DataValue min,
DataValue max)
throws InvalidDataException
Font values do not support this operation, but they always throw an
InvalidDataException instead.
deinterpolate in interface DataValuemin - a data value representing a range's lower limitmax - a data value representing a range's higher limit
InvalidDataException - if the de-interpolation failsDataValue.interpolate(double, com.davisor.data.DataValue),
DeinterpolationException,
TupleData.deinterpolate(com.davisor.data.DataValue, com.davisor.data.DataValue)
public DataValue div(DataValue value)
throws InvalidDataException
div in interface DataValuevalue - the divider.
InvalidDataException - if the data value cannot be divided.public DataValue floor(DataValue precision)
floor in interface DataValueprecision - the precision within quantization occurs
ceil(com.davisor.data.DataValue)public java.lang.String getFormat()
The font data optimal specification string is always the current specification string for the current type.
getFormat in interface DataValueData.getType(),
Type.getFormat(),
Type.setFormat(java.lang.String)
public DataValue interpolate(double value,
DataValue max)
throws InvalidDataException
Font values do not support this operation, but they always throw an
InvalidDataException instead.
interpolate in interface DataValuevalue - the scalar value to be interpolatedmax - a data value representing a range's higher limit
InvalidDataException - if the interpolation failsDataValue.deinterpolate(com.davisor.data.DataValue, com.davisor.data.DataValue)
public DataValue max(DataValue value)
throws InvalidDataException
max in interface DataValuevalue - a data value to be compared with this data value
InvalidDataException - if the data value cannot be compared.
public DataValue min(DataValue value)
throws InvalidDataException
min in interface DataValuevalue - a data value to be compared with this data value
InvalidDataException - if the data value cannot be compared.
public DataValue mul(DataValue value)
throws InvalidDataException
mul in interface DataValuevalue - the multiplier.
InvalidDataException - if the data value cannot be multiplied.
public DataValue negate()
throws InvalidDataException
negate in interface DataValueInvalidDataException - if absolute value can not be computed
public void setValue(java.lang.String value,
java.text.ParsePosition status)
throws InvalidDataException
setValue in interface DataValuevalue - string value to be parsed (may be null)status - parse status (may be null)
InvalidDataException - always.CountType.countValue(String,ParsePosition)
public DataValue sub(DataValue value)
throws InvalidDataException
sub in interface DataValuevalue - a data value to be substracted from this data value
InvalidDataException - if the value cannot be
substracted.
public void toStatement(java.sql.PreparedStatement statement,
int parameter)
throws java.sql.SQLException
toStatement in interface DataValuestatement - statement to be updatedparameter - index of statement parameter to be updated
java.sql.SQLException - if a SQL error occurs.public java.lang.String toXML()
toXML in interface DataValuetoString()
public DataValue unit(DataValue targetValue,
double maxSteps)
The font data does not support the concept of unit values. Calling this method raises a runtime error.
unit in interface DataValuetargetValue - target value to be reached (may be null)maxSteps - maximum number of steps (zero leaves the choise open)
public com.davisor.core.Dupable dup()
dup in interface com.davisor.core.Dupablepublic java.lang.String toString()
toString method.
toString in interface DataValueFontParameters.FontParameters(Font),
FontParameters.toString()public boolean isScalable()
isScalable in interface Scalable
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||