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

## datechooser.model.multiple
Class MultyDateChooseModel

    java.lang.Object
      datechooser.model.AbstractDateChooseModel
          datechooser.model.multiple.MultyDateChooseModel

All Implemented Interfaces:
  DateChoose, MultyDateChoose, java.io.Serializable

    public class MultyDateChooseModel

extends AbstractDateChooseModel
implements MultyDateChoose

Multy selection model. Used in all beans.
Модель с возможность множественного выбора. Используется во всех компонентах.

Since:
  1.0
Author:
  Androsov Vadim
See Also:
  `DateChoose`, `MultyDateChoose`, Serialized Form

Field Summary

Fields inherited from class datechooser.model.AbstractDateChooseModel
`changeEventsOn`

Constructor Summary
`MultyDateChooseModel(java.util.Calendar current)`

Method Summary
`protected void` | `applySelection()` Делает попытка выбрать ячейку под курсором.
`void` | `applySelectNothing()` Попытка не выбрать ни одной даты.
`MultyModelBehavior` | `getBehavior()` Get multiple choise mode.
`CellState` | `getCellState(int row, int column)` State of the specified cell.
`java.util.Calendar` | `getDefaultDate()` Default date.
`java.lang.Iterable<Period>` | `getDefaultPeriods()`
`PeriodSet` | `getDefaultPeriodSet()`
`MultySelectModes` | `getMode()`
`java.util.Calendar` | `getSelectedDate()` Last selected date.
`java.lang.Iterable<java.util.Calendar>` | `getSelectedDates()` Get all selected dates.
`Period` | `getSelectedPeriod()` Last selected period.
`java.lang.Iterable<Period>` | `getSelectedPeriods()` Get selected periods.
`PeriodSet` | `getSelectedPeriodSet()` Get selected periods.
`protected PeriodSet` | `getSelection()`
`boolean` | `isAdd()`
`protected boolean` | `isForbiddenDefault(PeriodSet forbiddenPeriods)`
`boolean` | `isNothingSelected()` True if no selected dates (null selection).
`boolean` | `isPeriodSelectionStarted()`
`protected boolean` | `isPeriodSetForbidden(PeriodSet periods)`
`boolean` | `isSelected(java.util.Calendar aDate)` Is specified date selected.
`void` | `reset()` Resets selection.
`protected void` | `selectColumn(int column)`
`void` | `setAdd(boolean add)` Sets period or date addition mode.
`void` | `setBehavior(MultyModelBehavior behavior)` Sets multiple choise mode.
`void` | `setDefaultPeriods(java.lang.Iterable<Period> newPeriods)`
`void` | `setDefaultPeriodSet(PeriodSet periodSet)`
`void` | `setMode(MultySelectModes mode, boolean add)` Sets selection mode.
`void` | `setNothingSelected(boolean nothingSelected)` Selects nothing (null).
`void` | `setPeriodSelectionStarted(boolean periodSelectionStarted)` User started period selection.
`void` | `setSelectedPeriods(java.lang.Iterable<Period> newSelection)`
`void` | `setSelectedPeriods(PeriodSet newSelection)`

Methods inherited from class datechooser.model.AbstractDateChooseModel
`addCommitListener, addCursorMoveListener, addPropertyChangeListener, addSelectionChangedListener, commit, fireCursorMove, firePropertyChange, fireSelectionChange, getCellCaption, getCellDate, getColsCount, getCurrent, getForbidden, getForbiddenSet, getLocale, getMaxConstraint, getMinConstraint, getRowsCount, getVisibleDate, invalidate, isAutoScroll, isChangeEventsOn, isCursor, isDateForbidden, isEnabled, isLocked, isNothingAllowed, isPeriodForbidden, isShowNeighbourMonth, monthShift, needsFullValidation, removeCommitListener, removeCursorMoveListener, removePropertyChangeListener, removeSelectionChangedListener, select, select, selectNothing, setAutoScroll, setChangeEventsOn, setConstraints, setDefaultDate, setEnabled, setForbidden, setForbiddenSet, setLocale, setLocked, setMaxConstraint, setMinConstraint, setNothingAllowed, setSelectedDate, setShowNeighbourMonth, shift, showMonthYear, tryApplySelection, yearShift`

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

Methods inherited from interface datechooser.model.DateChoose
`addCommitListener, addCursorMoveListener, addPropertyChangeListener, addSelectionChangedListener, commit, fireSelectionChange, getCellCaption, getCellDate, getColsCount, getCurrent, getForbidden, getLocale, getMaxConstraint, getMinConstraint, getRowsCount, getVisibleDate, isAutoScroll, isCursor, isEnabled, isLocked, isNothingAllowed, isShowNeighbourMonth, monthShift, needsFullValidation, removeCommitListener, removeCursorMoveListener, removePropertyChangeListener, removeSelectionChangedListener, select, select, selectNothing, setAutoScroll, setConstraints, setDefaultDate, setEnabled, setForbidden, setLocale, setLocked, setMaxConstraint, setMinConstraint, setNothingAllowed, setSelectedDate, setShowNeighbourMonth, shift, showMonthYear, tryApplySelection, yearShift`

Constructor Detail

### MultyDateChooseModel

    public MultyDateChooseModel(java.util.Calendar current)

Method Detail

### isSelected

    public boolean isSelected(java.util.Calendar aDate)

  Description copied from interface: `DateChoose`
  Is specified date selected.
  Выбрана ли ячейка

  Specified by:
    `isSelected` in interface `DateChoose`

### getSelectedDate

    public java.util.Calendar getSelectedDate()

  Last selected date.
  Возвращает последнюю выбранную дату (для этой модели вернет то, что скорее всего ожидалость, только если выбрана одна дата)

  Specified by:
    `getSelectedDate` in interface `DateChoose`

### reset

    public void reset()

  Description copied from interface: `MultyDateChoose`
  Resets selection.
  Сброс , чтобы выбирать сначала.

  Specified by:
    `reset` in interface `MultyDateChoose`

### getSelectedDates

    public java.lang.Iterable<java.util.Calendar> getSelectedDates()

  Description copied from interface: `MultyDateChoose`
  Get all selected dates.
  Возвращает выбранные даты.

  Specified by:
    `getSelectedDates` in interface `MultyDateChoose`

### getSelectedPeriods

    public java.lang.Iterable<Period> getSelectedPeriods()

  Description copied from interface: `MultyDateChoose`
  Get selected periods.
  Возвращает выбранные периоды.

  Specified by:
    `getSelectedPeriods` in interface `MultyDateChoose`
  See Also:
    `Period`

### getSelectedPeriodSet

    public PeriodSet getSelectedPeriodSet()

  Description copied from interface: `MultyDateChoose`
  Get selected periods.
  Возвращает выбранные периоды.

  Specified by:
    `getSelectedPeriodSet` in interface `MultyDateChoose`
  See Also:
    `PeriodSet`

### setSelectedPeriods

    public void setSelectedPeriods(java.lang.Iterable<Period> newSelection)

### setSelectedPeriods

    public void setSelectedPeriods(PeriodSet newSelection)

### getSelectedPeriod

    public Period getSelectedPeriod()

  Last selected period.
  Возвращаем последний выбранный период. Думается, это наиболее привлекательный метод работы с компонентом.

### setMode

    public void setMode(MultySelectModes mode,
                        boolean add)

  Description copied from interface: `MultyDateChoose`
  Sets selection mode. Установка режима выбора.

  Specified by:
    `setMode` in interface `MultyDateChoose`
  See Also:
    `MultySelectModes`

### isAdd

    public boolean isAdd()

### setAdd

    public void setAdd(boolean add)

  Description copied from interface: `MultyDateChoose`
  Sets period or date addition mode.
  Устанавливает режим добавления даты или периода.

  Specified by:
    `setAdd` in interface `MultyDateChoose`

### isPeriodSelectionStarted

    public boolean isPeriodSelectionStarted()

### setPeriodSelectionStarted

    public void setPeriodSelectionStarted(boolean periodSelectionStarted)

  Description copied from interface: `MultyDateChoose`
  User started period selection.
  Указывает что было выбрано начало периода.

  Specified by:
    `setPeriodSelectionStarted` in interface `MultyDateChoose`

### applySelection

    protected void applySelection()

  Description copied from class: `AbstractDateChooseModel`
  Делает попытка выбрать ячейку под курсором. Что делать дальше зависит от допустимых вариантов выбора.

  Specified by:
    `applySelection` in class `AbstractDateChooseModel`

### setBehavior

    public void setBehavior(MultyModelBehavior behavior)

  Description copied from interface: `MultyDateChoose`
  Sets multiple choise mode.
  Устанавливает поведение модели (варианты множественного выбора).

  Specified by:
    `setBehavior` in interface `MultyDateChoose`
  See Also:
    `MultyModelBehavior`

### getBehavior

    public MultyModelBehavior getBehavior()

  Description copied from interface: `MultyDateChoose`
  Get multiple choise mode.
  Возвращает поведение модели (варианты множественного выбора).

  Specified by:
    `getBehavior` in interface `MultyDateChoose`
  See Also:
    `MultyModelBehavior`

### getDefaultPeriodSet

    public PeriodSet getDefaultPeriodSet()

### setDefaultPeriodSet

    public void setDefaultPeriodSet(PeriodSet periodSet)
                             throws IncompatibleDataExeption

  Throws:
    `IncompatibleDataExeption`

### isPeriodSetForbidden

    protected boolean isPeriodSetForbidden(PeriodSet periods)

### getDefaultDate

    public java.util.Calendar getDefaultDate()

  Description copied from interface: `DateChoose`
  Default date.
  Дата по умолчанию.

  Specified by:
    `getDefaultDate` in interface `DateChoose`
  Overrides:
    `getDefaultDate` in class `AbstractDateChooseModel`

### getDefaultPeriods

    public java.lang.Iterable<Period> getDefaultPeriods()

### setDefaultPeriods

    public void setDefaultPeriods(java.lang.Iterable<Period> newPeriods)
                           throws IncompatibleDataExeption

  Throws:
    `IncompatibleDataExeption`

### getCellState

    public CellState getCellState(int row,
                                  int column)

  Description copied from interface: `DateChoose`
  State of the specified cell.
  Состояние указанной ячейки.

  Specified by:
    `getCellState` in interface `DateChoose`
  Overrides:
    `getCellState` in class `AbstractDateChooseModel`

### selectColumn

    protected void selectColumn(int column)

  Specified by:
    `selectColumn` in class `AbstractDateChooseModel`

### getMode

    public MultySelectModes getMode()

### getSelection

    protected PeriodSet getSelection()

### applySelectNothing

    public void applySelectNothing()

  Description copied from class: `AbstractDateChooseModel`
  Попытка не выбрать ни одной даты.

  Specified by:
    `applySelectNothing` in class `AbstractDateChooseModel`

### isForbiddenDefault

    protected boolean isForbiddenDefault(PeriodSet forbiddenPeriods)

  Overrides:
    `isForbiddenDefault` in class `AbstractDateChooseModel`

### isNothingSelected

    public boolean isNothingSelected()

  Description copied from interface: `DateChoose`
  True if no selected dates (null selection).
  Возвращает истину, если не выбрано ни одной даты.

  Specified by:
    `isNothingSelected` in interface `DateChoose`

### setNothingSelected

    public void setNothingSelected(boolean nothingSelected)

  Description copied from interface: `DateChoose`
  Selects nothing (null).
  Снимает выбор со всех дат.

  Specified by:
    `setNothingSelected` in interface `DateChoose`

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