rs.sol.soloist.server.builtindomains.builtindatatypes
Class Font

java.lang.Object
  extended by rs.sol.soloist.server.uml.commonimplementation.runtime._ClassifierInstance
      extended by rs.sol.soloist.server.uml.commonimplementation.runtime._DataTypeInstance
          extended by rs.sol.soloist.server.javaimpl.runtime.SOLoistDataTypeInstance
              extended by rs.sol.soloist.server.builtindomains.builtindatatypes.InstanceOfDataType
                  extended by rs.sol.soloist.server.builtindomains.builtindatatypes.InstanceOfPrimitiveType
                      extended by rs.sol.soloist.server.builtindomains.builtindatatypes.Font
All Implemented Interfaces:
rs.sol.soloist.server.uml.concepts.IElement, IClassifierInstance, IDataTypeInstance, IPrimitiveTypeInstance, IRTElement

public class Font
extends InstanceOfPrimitiveType


Nested Class Summary
static class Font.Context
           
static class Font.DefaultHandler
           
 
Field Summary
static java.lang.String BORDER_COLOR
           
static java.lang.String BORDER_WIDTH
           
static IPrimitiveType CLASSIFIER
           
static java.lang.String COLOR
           
static java.lang.String FONT_FAMILY
           
static java.lang.String FONT_SIZE
           
static java.lang.String FONT_STYLE
           
static java.lang.String FONT_WEIGHT
           
static java.util.regex.Pattern fontRegex
           
static java.lang.String FQ_TYPE_NAME
           
static double MILLIMETERS_PER_CM
           
static double MILLIMETERS_PER_INCH
           
static double MILLIMETERS_PER_PICA
           
static double MILLIMETERS_PER_POINT
           
static java.lang.String TEXT_ALIGN
           
static java.lang.String TEXT_DECORATION
           
static java.lang.String VERTICAL_ALIGN
           
 
Constructor Summary
Font()
           
Font(java.util.Map<java.lang.String,java.lang.String> cssPropertyValues)
           
 
Method Summary
static double alignment(java.lang.String alignment, Font.Context context)
           
static int awtFontStyle(java.lang.String fontWeight, java.lang.String fontStyle, Font.Context context)
           
 boolean equals(java.lang.Object obj)
           
static Font fromCSSString(java.lang.String cssString)
           
static Font fromSerializable(java.io.Serializable ser)
           
 java.lang.String get(java.lang.String cssProperty)
           
 java.lang.String getCSSString()
           
static java.lang.String getProperty(Font font, java.lang.String propertyName, Font defaultFont)
           
 java.lang.String getSQLString()
           
 java.lang.String getValue()
           
 int hashCode()
           
 boolean isEqualTo(IClassifierInstance ci)
          Is this Classifier Instance equal to the given Classifier Instance?
Semantic rules:
1.
 IClassifierInstance makeClone()
          Clones this Classifier Instance.
static double toMillimeters(java.lang.String sizeString, Font.Context context)
           
 java.lang.String toString()
           
 Font with(java.lang.String cssProperty, java.lang.String value)
           
 
Methods inherited from class rs.sol.soloist.server.builtindomains.builtindatatypes.InstanceOfPrimitiveType
accept, accept, toSerializable
 
Methods inherited from class rs.sol.soloist.server.javaimpl.runtime.SOLoistDataTypeInstance
addAttributeValue, getAttributeValue, getDataType, getMyID, getSlot, getSlots, setDataType, setMyID
 
Methods inherited from class rs.sol.soloist.server.uml.commonimplementation.runtime._DataTypeInstance
getClassifier, hasIdentity, isClassInstance, isDataTypeInstance, isMarkedAsDeleted, markAsDeleted
 
Methods inherited from class rs.sol.soloist.server.uml.commonimplementation.runtime._ClassifierInstance
conformsTo, constructor, copySlots, copySlots, destroy, destructor, getAttributeValue, getAttributeValue, getAttributeValue, getAttributeValues, getClassifierFQName, getClassifierUQName, getFirstCommonGeneralizer, getFirstCommonGeneralizerFQName, getFirstCommonGeneralizerUQName, getMElement, getSlot, getSlot, getSlot, isDirectInstanceOf, isDirectInstanceOf, isInstanceOf, isInstanceOf, isKindOf, isModelElement, isRTElement
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface rs.sol.soloist.server.uml.concepts.runtime.IDataTypeInstance
getDataType
 
Methods inherited from interface rs.sol.soloist.server.uml.concepts.runtime.IClassifierInstance
conformsTo, constructor, copySlots, copySlots, destroy, destructor, getAttributeValue, getAttributeValue, getAttributeValue, getAttributeValues, getClassifier, getClassifierFQName, getClassifierUQName, getFirstCommonGeneralizer, getFirstCommonGeneralizerFQName, getFirstCommonGeneralizerUQName, getMyID, getSlot, getSlot, getSlot, getSlot, getSlots, isClassInstance, isDataTypeInstance, isDirectInstanceOf, isDirectInstanceOf, isInstanceOf, isInstanceOf, isMarkedAsDeleted, markAsDeleted
 
Methods inherited from interface rs.sol.soloist.server.uml.concepts.runtime.IRTElement
getMElement, hasIdentity
 
Methods inherited from interface rs.sol.soloist.server.uml.concepts.IElement
isKindOf, isModelElement, isRTElement
 

Field Detail

FQ_TYPE_NAME

public static final java.lang.String FQ_TYPE_NAME
See Also:
Constant Field Values

CLASSIFIER

public static final IPrimitiveType CLASSIFIER

COLOR

public static final java.lang.String COLOR
See Also:
Constant Field Values

FONT_SIZE

public static final java.lang.String FONT_SIZE
See Also:
Constant Field Values

FONT_FAMILY

public static final java.lang.String FONT_FAMILY
See Also:
Constant Field Values

FONT_WEIGHT

public static final java.lang.String FONT_WEIGHT
See Also:
Constant Field Values

FONT_STYLE

public static final java.lang.String FONT_STYLE
See Also:
Constant Field Values

TEXT_DECORATION

public static final java.lang.String TEXT_DECORATION
See Also:
Constant Field Values

TEXT_ALIGN

public static final java.lang.String TEXT_ALIGN
See Also:
Constant Field Values

VERTICAL_ALIGN

public static final java.lang.String VERTICAL_ALIGN
See Also:
Constant Field Values

BORDER_COLOR

public static final java.lang.String BORDER_COLOR
See Also:
Constant Field Values

BORDER_WIDTH

public static final java.lang.String BORDER_WIDTH
See Also:
Constant Field Values

fontRegex

public static final java.util.regex.Pattern fontRegex

MILLIMETERS_PER_CM

public static final double MILLIMETERS_PER_CM
See Also:
Constant Field Values

MILLIMETERS_PER_INCH

public static final double MILLIMETERS_PER_INCH
See Also:
Constant Field Values

MILLIMETERS_PER_PICA

public static final double MILLIMETERS_PER_PICA
See Also:
Constant Field Values

MILLIMETERS_PER_POINT

public static final double MILLIMETERS_PER_POINT
See Also:
Constant Field Values
Constructor Detail

Font

public Font()

Font

public Font(java.util.Map<java.lang.String,java.lang.String> cssPropertyValues)
Method Detail

get

public java.lang.String get(java.lang.String cssProperty)

with

public Font with(java.lang.String cssProperty,
                 java.lang.String value)

fromCSSString

public static Font fromCSSString(java.lang.String cssString)

isEqualTo

public boolean isEqualTo(IClassifierInstance ci)
                  throws rs.sol.soloist.server.uml.exceptions.RequestFailedException
Description copied from interface: IClassifierInstance
Is this Classifier Instance equal to the given Classifier Instance?
Semantic rules:
1. If this and ci are instances of different kinds of Classifiers (one is an instance of a Class, and the other is an instance of a Data Type) they are different (not equal).
2. If this and ci refer to two different instances of Classes, they are different (not equal).
3. If this and ci refer to two instances of Data Types, their equality is checked on value basis (if all of their Slots are equal).

Specified by:
isEqualTo in interface IClassifierInstance
Overrides:
isEqualTo in class rs.sol.soloist.server.javaimpl.runtime.SOLoistDataTypeInstance
Throws:
rs.sol.soloist.server.uml.exceptions.RequestFailedException

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Specified by:
toString in interface IDataTypeInstance
Overrides:
toString in class rs.sol.soloist.server.uml.commonimplementation.runtime._ClassifierInstance

getSQLString

public java.lang.String getSQLString()
Specified by:
getSQLString in interface IDataTypeInstance
Overrides:
getSQLString in class InstanceOfPrimitiveType

getCSSString

public java.lang.String getCSSString()

getValue

public java.lang.String getValue()
Specified by:
getValue in interface IPrimitiveTypeInstance
Overrides:
getValue in class InstanceOfPrimitiveType

fromSerializable

public static Font fromSerializable(java.io.Serializable ser)

toMillimeters

public static double toMillimeters(java.lang.String sizeString,
                                   Font.Context context)

alignment

public static double alignment(java.lang.String alignment,
                               Font.Context context)
Parameters:
alignment - left, center, right, top, middle, bottom
Returns:
0.0, 0.5, 1.0, 0.0, 0.5, 1.0

awtFontStyle

public static int awtFontStyle(java.lang.String fontWeight,
                               java.lang.String fontStyle,
                               Font.Context context)

getProperty

public static java.lang.String getProperty(Font font,
                                           java.lang.String propertyName,
                                           Font defaultFont)

makeClone

public IClassifierInstance makeClone()
                              throws rs.sol.soloist.server.uml.exceptions.ActionExecutionFailedException
Description copied from interface: IClassifierInstance
Clones this Classifier Instance.

Throws:
rs.sol.soloist.server.uml.exceptions.ActionExecutionFailedException