Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jet.controls
Class JetColor

    java.lang.Object
      jet.controls.JetProperty
          jet.controls.JetColor

All Implemented Interfaces:
  jet.convert.ColorInfo, jet.convert.PropInfo, jet.util.Propertiable

    public class JetColor

extends JetProperty
implements jet.convert.ColorInfo

JetColor is for saving/retrieving a java.awt.Color value.

'Transparent' (either normal value or default value) is a tag that means no-color, and it doesn't equal the color whose alpha is 0(or 0.0).
The default value is always `Color.lightGray`(alpha=1, red=192/255, green=192/255, blue=192/255).

Field Summary

Fields inherited from class jet.controls.JetProperty
`CHART_BACKGROUND_EDITOR, CHART_FILLPATTERN_EDITOR, CHART_FILTER_EDITOR, CHART_FILTER_EDITOR_NO_DATE, CHART_ICON_STYLE, CHART_PATTERN_LIST_EDITOR, CHART_PENSTYLE_EDITOR, CHART_TEXTSTYLE_EDITOR, CHOICE_EDITOR, COLOR_EDITOR, COMBO_EDITOR, COMMAND_EDITOR, CONTROL_SELECT_ITEMS, DATASOURCE_EDITOR, DBCOL_EDITOR, DETAIL_REPORT_EDITOR, EDIT_FORBIDDEN, EDIT_FORBIDDEN_INIT, EDITABLE_ALLTIME, INTERNAL, LINK_EDITOR, MULSEL_EDITOR, PARAMCOL_EDITOR, QUERY_EDITOR, RECORDDB_EDITOR, SECURITY_EDITOR, TEXT_EDITOR`

Fields inherited from interface jet.util.Propertiable
`BIGSTRING, BOOLEAN, CHG_FMTTINGBLNAME, CHG_FMTTINGFORMULA, CHG_OTHER, COLOR, COMPFML_RESOURCE, CUSTOMER, CUSTOMERLINK, DELIM, DELIMCHAR, DOUBLE, ENUMERATION, IGNORED, IMAGE, IMGVECTOR, MAPPINGTBL, NORMAL_RESOURCE, NUMBER, REFERENCE, STRING, SUB1_DELIM, UNIT, VAL_NORMALLENGTH, VAL_NORMALSTART, VECTOR`

Constructor Summary
`JetColor()`
`JetColor(jet.controls.JetObject parent, java.lang.String name)` Creates a JetColor instance with the normal value is light-gray, and it can not support 'Transparent'(no color).
`JetColor(jet.controls.JetObject parent, java.lang.String name, java.awt.Color value)` Constructor. Creates a JetColor instance which can not support 'Transparent'(no color).
`JetColor(jet.controls.JetObject parent, java.lang.String name, java.awt.Color value, boolean nullEnabled)` Constructor. Creates a JetColor instance.

Method Summary
`java.awt.Color` | `get()` Effective if `JetProperty.isCurrentAutoValue()` is false; returns a value according to the following priority: normal value > default value.
`int[]` | `getMatchingSqlType()` Now, this API only for designer UI : get Matching SQL Type of this property Usage in UI : list all the (normal-)formula whose data-type in returned array
`boolean` | `isNullEnabled()` Specifies whether to support 'Transparent'(no color).
`void` | `set(java.awt.Color color)` Sets the normal value via java.awt.Color.
`void` | `set(java.lang.String color)` Sets the normal value via a string.
`java.lang.String` | `toString()` Effective if `JetProperty.isCurrentAutoValue()` is false; convert a string value and returns it according to the following priority: normal value > default value.

Methods inherited from class jet.controls.JetProperty
`canChangeByBL, canChangeByFmtt, canChangeByOthers, enableAllChangeBys, getChangeBy, getChangeByBL, getChangeByBLName, getChangeByBLType, getChangeByFmtt, getChangeByFmttName, getChangeByObject, getChangeByObjectName, getChangeByOtherType, getCurrentChangedBy, getCurrentValue, getCurrentValue, getEditFlag, getEditorType, getInspValue, getInspValue, getName, getNormalObject, getObject, getParent, getPropertyChoice, getPropType, getRuntimeChangeBy, getUnifiedObject, getValue, isChagneByFmtt, isChangeByBL, isChangeByOther, isCurrentAutoValue, isCurrentChangedBy, isEnableAutoValue, isNull, isSetAnyChangeBy, isSetRuntimeChgBy, isTransient, loadFullChangeBy, propertyChanged, saveFullChangeBy, setAsAutoValue, setCanChangeByBL, setCanChangeByFmtt, setCanChangeByOthers, setChangeByBL, setChangeByBL, setChangeByFmtt, setChangeByObject, setChangeByObject, setEditFlag, setEditorType, setEnableAutoValue, setObject, setRuntimeChangeBy, setTransient, setUnitValue, toUnitString`

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

Methods inherited from interface jet.convert.PropInfo
`getChangeByObjectName, getInspValue, getName, getValue, isChangeByOther, isNull, toUnitString`

Constructor Detail

### JetColor

    public JetColor()

### JetColor

    public JetColor(jet.controls.JetObject parent,
                    java.lang.String name)

  Creates a JetColor instance with the normal value is light-gray, and it can not support 'Transparent'(no color).

  Parameters:
    `parent` - Owner.
    `name` - Name.
  See Also:
    `Color.lightGray`

### JetColor

    public JetColor(jet.controls.JetObject parent,
                    java.lang.String name,
                    java.awt.Color value)

  Constructor.
  Creates a JetColor instance which can not support 'Transparent'(no color).

  Parameters:
    `parent` - Owner.
    `name` - Name.
    `value` - The value to be set for the normal value; `null` means the default value.

### JetColor

    public JetColor(jet.controls.JetObject parent,
                    java.lang.String name,
                    java.awt.Color value,
                    boolean nullEnabled)

  Constructor.
  Creates a JetColor instance.

  Parameters:
    `parent` - The owner of the property.
    `name` - The property name
    `value` - The value to be set to normal value, `null` means default value if nullEnabled is false, otherwise 'Transparent'(no color).
    `nullEnabled` - Specifies whether to support 'Transparent'(no color) or not.

Method Detail

### isNullEnabled

    public boolean isNullEnabled()

  Specifies whether to support 'Transparent'(no color).

  Returns:
    true(support) | false(not support).
  Since:
    V9.1

### set

    public void set(java.awt.Color color)

  Sets the normal value via java.awt.Color.

  Parameters:
    `color` - The color to be set for the normal value; `null` means the default value if 'Transparent'(no color) is not supported, otherwise 'Transparent'(no color).
  See Also:
    `set(String)`, `isNullEnabled()`, `nullEnabled`, `setValue(Color)`

### set

    public void set(java.lang.String color)

  Sets the normal value via a string. If the format of the string is incorrect, it would be treated as the default value.

  Specified by:
    `set` in interface `jet.util.Propertiable`
  Overrides:
    `set` in class `JetProperty`
  Parameters:
    `color` - The string to be set for the normal value, which must be one of the following:
    1) hex format integer String which means an integer in hex format, such as "0xFF0000";
    2) "Transparent" or `null` which means the default value if 'Transparent'(no color) is not supported, otherwise 'Transparent'(no color).
  See Also:
    `set(Color)`, `isNullEnabled()`, `MiscTools._mapStringToColor(String)`, `nullEnabled`, `setValue(String)`

### get

    public java.awt.Color get()

  Effective if `JetProperty.isCurrentAutoValue()` is false; returns a value according to the following priority: normal value > default value.

  Specified by:
    `get` in interface `jet.convert.ColorInfo`
  Returns:
    a color or `null` which means 'Transparent'(no color).
  See Also:
    `JetProperty.isCurrentAutoValue()`

### toString

    public java.lang.String toString()

  Effective if `JetProperty.isCurrentAutoValue()` is false; convert a string value and returns it according to the following priority: normal value > default value.

  Specified by:
    `toString` in interface `jet.convert.PropInfo`
  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    1) a hex format integer String that describes a RGB value, for example, red is described as "0xFF0000"; or 2) "Transparent" which means 'Transparent'(no color).
  See Also:
    `get()`, `MiscTools.mapColorToString(Color)`, `JetProperty.isCurrentAutoValue()`

### getMatchingSqlType

    public int[] getMatchingSqlType()

  Description copied from class: `JetProperty`
  Now, this API only for designer UI : get Matching SQL Type of this property
  Usage in UI : list all the (normal-)formula whose data-type in returned array

  Overrides:
    `getMatchingSqlType` in class `JetProperty`
  See Also:
    `Db`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD