datechooser.view.appearance
Class AppearancesList

java.lang.Object
  extended by datechooser.view.appearance.AppearancesList
All Implemented Interfaces:
java.beans.PropertyChangeListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener

public class AppearancesList
extends java.lang.Object
implements java.beans.PropertyChangeListener, java.lang.Cloneable, java.io.Serializable

Bean's appearances list. It has some hardcoded views, allows add new views.
Список профилей внешнего вида компонента. Имеет ряд жеско закодированных профилей, позволяет добавлять новые.

Since:
1.0
Author:
Androsov Vadim
See Also:
CellAppearance, Serialized Form

Field Summary
static java.lang.String CUSTOM
          Editable view.
static java.lang.String DEFAULT
          Default appearance.
 
Constructor Summary
AppearancesList()
          Default constructor creates only hardcoded profiles and one custom view.
AppearancesList(boolean autoInit)
          Constructor creates hardcoded profiles and allows control editable view creation.
AppearancesList(java.lang.String current, ViewAppearance... cellViews)
          This constructor is used for automatic initialization code.
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 java.lang.Object clone()
          Deep clone.
 ViewAppearance getAppearance(java.lang.String name)
          Get view with specified name.
 ViewAppearance getCurrent()
          Get current view.
 ViewAppearance getDefaultAppearance()
          Get default view.
 java.lang.Iterable<java.lang.String> getKeys()
          Get collection of registered views names.
 int getRegisteredCount()
          Registered views count.
 java.lang.String[] getRegisteredNames()
          Get array of registered views names.
 boolean isRegistered(java.lang.String name)
          Is profile with specified name registered.
 AppearancesList notDeepClone()
          Not deep clone.
 void propertyChange(java.beans.PropertyChangeEvent evt)
           
 void registerAppearance(ViewAppearance anAppearance)
          Registers new view.
 void registerHardCodedAppearance(ViewAppearance anAppearance)
          Register new uneditable view.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 boolean setCurrent(java.lang.String name)
          Activates view with specified name.
 boolean unRegisterAppearance(java.lang.String aName)
          Deletes view with specified name if it is not (default or uneditable).
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT

public static java.lang.String DEFAULT
Default appearance.
Внешний вид по умолчанию.


CUSTOM

public static java.lang.String CUSTOM
Editable view.
Редактируемый профиль.

Constructor Detail

AppearancesList

public AppearancesList()
Default constructor creates only hardcoded profiles and one custom view.
Конструктор по умолчанию. Создает жестко закодированные профили и один редактируемый.

Since:
1.0

AppearancesList

public AppearancesList(boolean autoInit)
Constructor creates hardcoded profiles and allows control editable view creation.
Конструктор с управлением создания редактируемого профиля.

Parameters:
autoInit - Does editable view must be created (as a clone of default view).
Создавать ли автоматически редактируемый профиль (на основе клонирования профиля по умолчанию).
Since:
1.0

AppearancesList

public AppearancesList(java.lang.String current,
                       ViewAppearance... cellViews)
This constructor is used for automatic initialization code.
Этот конструктор используется при автоматической генерации кода.

Parameters:
current - Selected view name.
Имя активного профиля внешнего вида.
cellViews - List of accessible views.
Доступные профили внешнего вида.
Since:
1.0
Method Detail

getRegisteredCount

public int getRegisteredCount()
Registered views count.
Количество зарегистрированных профилей.

Since:
1.0

isRegistered

public boolean isRegistered(java.lang.String name)
Is profile with specified name registered.
Проверяет, зарегистрирован ли профиль с заданным именем.

Since:
1.0

getRegisteredNames

public java.lang.String[] getRegisteredNames()
Get array of registered views names.
Получение массива имен зарегистрированных профилей.

Since:
1.0

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent evt)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener

getAppearance

public ViewAppearance getAppearance(java.lang.String name)
Get view with specified name.
Получить профиль по имени.

Parameters:
name - View name.
Имя профиля
Returns:
ViewAppearance class, null if view with specified name was not registered.
Профиль. null, если профиля с таким именем не зарегистрировано.
Since:
1.0
See Also:
ViewAppearance

getDefaultAppearance

public ViewAppearance getDefaultAppearance()
Get default view.
Получить профиль по умолчанию.

Since:
1.0

setCurrent

public boolean setCurrent(java.lang.String name)
Activates view with specified name.
Активирует профиль с указанным именем.

Parameters:
name - Name of activating view.
Имя активируемого профиля.
Since:
1.0

getCurrent

public ViewAppearance getCurrent()
Get current view.
Возвращает активный профиль.

Since:
1.0

registerAppearance

public void registerAppearance(ViewAppearance anAppearance)
Registers new view.
Регистрирует новый профиль

Since:
1.0
See Also:
ViewAppearance

registerHardCodedAppearance

public void registerHardCodedAppearance(ViewAppearance anAppearance)
Register new uneditable view.
Регистрирует новый профиль, помечая его как нередактируемый.

Since:
1.0
See Also:
ViewAppearance

unRegisterAppearance

public boolean unRegisterAppearance(java.lang.String aName)
Deletes view with specified name if it is not (default or uneditable).
Удаляет профиль с заданным именем, если это не профиль по умолчанию или настраиваемый.

Since:
1.0

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)

clone

public java.lang.Object clone()
Deep clone.
Глубокое клонирование.

Overrides:
clone in class java.lang.Object
Since:
1.0

notDeepClone

public AppearancesList notDeepClone()
Not deep clone.
Поверхностное клонирование.

Since:
1.0

getKeys

public java.lang.Iterable<java.lang.String> getKeys()
Get collection of registered views names.
Возвращает список имен зарегистрированых профилей.

Since:
1.0