|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.plaf.ComponentUI
org.jdesktop.swingx.plaf.MonthViewUI
org.jdesktop.swingx.plaf.basic.BasicMonthViewUI
public class BasicMonthViewUI
Base implementation of the JXMonthView
UI.
Note: The api changed considerably between releases 0.9.1 and 0.9.2. Most of the old methods are still available but deprecated. It's strongly recommended to update subclasses soon, because those methods will be removed before 0.9.3.
The general drift of the change was
Field Summary | |
---|---|
protected java.awt.Rectangle |
calendarGrid
The bounding box of the grid of visible months. |
protected java.text.SimpleDateFormat |
dayOfMonthFormatter
Formatter used to format the day of the week to a numerical value. |
protected java.awt.Font |
derivedFont
Used as the font for flagged days. |
protected boolean |
isLeftToRight
|
static int |
MONTH_DOWN
Return value used to identify when the month down button is pressed. |
static int |
MONTH_UP
Return value used to identify when the month up button is pressed. |
protected javax.swing.Icon |
monthDownImage
|
protected java.lang.String[] |
monthsOfTheYear
localized names of all months. |
protected javax.swing.Icon |
monthUpImage
|
protected JXMonthView |
monthView
the component we are installed for. |
Constructor Summary | |
---|---|
BasicMonthViewUI()
|
Method Summary | |
---|---|
protected java.awt.Font |
createDerivedFont()
Create a derived font used to when painting various pieces of the month view component. |
protected java.awt.LayoutManager |
createLayoutManager()
|
protected java.awt.event.MouseListener |
createMouseListener()
|
protected java.awt.event.MouseMotionListener |
createMouseMotionListener()
|
protected java.beans.PropertyChangeListener |
createPropertyChangeListener()
|
static javax.swing.plaf.ComponentUI |
createUI(javax.swing.JComponent c)
|
protected java.util.Calendar |
getCalendar()
Returns the monthViews calendar configured to the firstDisplayedDate. |
protected java.util.Calendar |
getCalendar(java.util.Date date)
Returns the monthViews calendar configured to the given time. |
java.util.Date |
getDayAtLocation(int x,
int y)
Returns the Date at the given location. |
protected java.awt.Rectangle |
getDayBounds(java.util.Date date)
Returns the bounds of the given day. |
protected java.awt.Rectangle |
getDayBoundsAtLocation(int x,
int y)
Returns the bounds of the day in the grid of days which contains the given location. |
protected java.awt.Point |
getDayGridPosition(java.util.Date date)
Returns the given date's position in the grid of the month it is contained in. |
protected java.awt.Point |
getDayGridPositionAtLocation(int x,
int y)
Returns the logical coordinates of the day which contains the given location. |
protected java.util.Date |
getDayInMonth(java.util.Date month,
int row,
int column)
Returns the Date defined by the logical grid coordinates relative to the given month. |
protected java.awt.Dimension |
getDaySize()
Returns the size of a day including the padding. |
java.lang.String[] |
getDaysOfTheWeek()
Returns an array of String to use as names for the days of the week. |
protected java.util.Date |
getFirstDisplayedDay()
|
protected int |
getFirstDisplayedMonth()
|
protected int |
getFirstDisplayedYear()
|
java.util.Date |
getLastDisplayedDay()
Returns the last possible date that can be displayed. |
protected java.util.Date |
getMonth(int row,
int column)
Returns the Date representing the start of the month at the given logical position in the grid of months. |
protected java.util.Date |
getMonthAtLocation(int x,
int y)
Returns the Date representing the start of the month which contains the given location. |
protected java.awt.Rectangle |
getMonthBounds(java.util.Date date)
Returns the bounds of the month containing the given date. |
protected java.awt.Rectangle |
getMonthBounds(int row,
int column)
Returns the bounds of the month at the given logical coordinates in the grid of visible months. |
protected java.awt.Rectangle |
getMonthBoundsAtLocation(int x,
int y)
Returns the bounds of the month which contains the given location. |
protected java.awt.Point |
getMonthGridPosition(java.util.Date date)
Returns the logical grid position of the month containing the given date. |
protected java.awt.Point |
getMonthGridPositionAtLocation(int x,
int y)
Returns the logical coordinates of the month which contains the given location. |
protected java.awt.Rectangle |
getMonthHeaderBoundsAtLocation(int x,
int y)
Returns the bounds of the month header which contains the given location. |
protected int |
getMonthHeaderHeight()
Returns the height of the month header. |
protected java.awt.Dimension |
getMonthSize()
Returns the size of a month. |
protected java.util.SortedSet<java.util.Date> |
getSelection()
|
protected java.util.Date |
getToday()
|
protected int |
getTraversableGridPositionAtLocation(int x,
int y)
Mapping pixel to bounds. |
protected int |
getWeeks(java.util.Calendar month)
Returns the number of weeks to paint in the current month, as represented by the given calendar. |
protected void |
installComponents()
|
protected void |
installDefaults()
|
protected void |
installKeyboardActions()
|
protected void |
installListeners()
|
void |
installUI(javax.swing.JComponent c)
|
protected boolean |
isToday(java.util.Date date)
Returns true if the date passed in is the same as today. |
boolean |
isUsingKeyboard()
|
void |
paint(java.awt.Graphics g,
javax.swing.JComponent c)
|
protected void |
paintBackground(java.awt.Rectangle clip,
java.awt.Graphics g)
|
protected void |
paintDay(java.awt.Graphics g,
int left,
int top,
java.util.Calendar calendar)
Paints a day the current month, represented by the calendar in a day-box located at left/top. |
protected void |
paintDayBackground(java.awt.Graphics g,
int x,
int y,
int width,
int height,
java.util.Calendar cal)
Paint the background for the day specified by the given calendar. |
protected void |
paintDayForeground(java.awt.Graphics g,
int x,
int y,
int width,
int height,
java.util.Calendar cal)
Paint the foreground for the specified day. |
protected void |
paintDayForeground(java.awt.Graphics g,
java.lang.String numericDay,
int x,
int y,
java.util.Calendar cal)
Paints string of the day. |
protected void |
paintDayOfTheWeekBackground(java.awt.Graphics g,
int x,
int y,
int width,
int height,
java.util.Calendar cal)
|
protected void |
paintDays(java.awt.Graphics g,
int left,
int top,
int width,
java.util.Calendar cal)
Paints all days in the days' grid, that is the month area below the daysOfWeek and to the right/left (depending on the monthView's componentOrientation) of the weekOfYears. |
protected void |
paintFlaggedDayBackground(java.awt.Graphics g,
int x,
int y,
int width,
int height,
java.util.Calendar cal)
Paint the background for the specified flagged day. |
protected void |
paintFlaggedDayForeground(java.awt.Graphics g,
int x,
int y,
int width,
int height,
java.util.Calendar cal)
Paint the foreground for the specified flagged day. |
protected void |
paintLeadingDay(java.awt.Graphics g,
int left,
int top,
java.util.Calendar calendar)
Paints a leading day of the current month, represented by the calendar, in a day-box located at left/top. |
protected void |
paintLeadingDayBackground(java.awt.Graphics g,
int x,
int y,
int width,
int height,
java.util.Calendar cal)
Paint the background for the specified leading day. |
protected void |
paintLeadingDayForeground(java.awt.Graphics g,
int x,
int y,
int width,
int height,
java.util.Calendar cal)
Paint the foreground for the specified leading day. |
protected void |
paintMonth(java.awt.Graphics g,
int x,
int y,
int width,
int height,
java.util.Calendar calendar)
Paints a month. |
protected void |
paintMonthStringBackground(java.awt.Graphics g,
int x,
int y,
int width,
int height,
java.util.Calendar cal)
Paints the background of the month string. |
protected void |
paintMonthStringForeground(java.awt.Graphics g,
int x,
int y,
int width,
int height,
java.util.Calendar cal)
Note: the given calendar must not be changed. |
protected void |
paintMonthStringForeground(java.awt.Graphics g,
java.lang.String monthName,
int monthX,
int monthY,
java.lang.String yearName,
int yearX,
int yearY,
java.util.Calendar cal)
Paints only text for month and year. |
protected void |
paintTrailingDay(java.awt.Graphics g,
int left,
int top,
java.util.Calendar calendar)
Paints a trailing day of the current month, represented by the calendar, in a day-box located at left/top. |
protected void |
paintTrailingDayBackground(java.awt.Graphics g,
int x,
int y,
int width,
int height,
java.util.Calendar cal)
Paint the background for the specified trailing day. |
protected void |
paintTrailingDayForeground(java.awt.Graphics g,
int x,
int y,
int width,
int height,
java.util.Calendar cal)
Paint the foreground for the specified trailing day. |
protected void |
paintUnselectableDayBackground(java.awt.Graphics g,
int x,
int y,
int width,
int height,
java.util.Calendar cal)
Paint the foreground for the specified unselectable day. |
protected void |
paintUnselectableDayForeground(java.awt.Graphics g,
int x,
int y,
int width,
int height,
java.util.Calendar cal)
Paint the foreground for the specified unselectable day. |
protected void |
paintWeekOfYearBackground(java.awt.Graphics g,
int x,
int y,
int width,
int height,
java.util.Calendar cal)
|
protected void |
paintWeekOfYearForeground(java.awt.Graphics g,
int x,
int y,
int width,
int height,
java.util.Calendar cal)
Paints the week of the year of the week of the year represented by the given calendar. |
protected void |
paintWeeksOfYear(java.awt.Graphics g,
int x,
int initialY,
int width,
java.util.Calendar cal)
Paints the weeks of year if the showingWeek property is true. |
protected void |
setFirstDisplayedDay(java.util.Date firstDisplayedDate)
Sets the firstDisplayedDate property to the given value. |
void |
setUsingKeyboard(boolean val)
|
protected void |
uninstallComponents()
|
protected void |
uninstallDefaults()
|
protected void |
uninstallKeyboardActions()
|
protected void |
uninstallListeners()
|
void |
uninstallUI(javax.swing.JComponent c)
|
protected void |
updateComponentInputMap()
Binds/clears the keystrokes in the component input map, based on the monthView's componentInputMap enabled property. |
protected void |
updateLocale()
Updates month and day names according to specified locale. |
Methods inherited from class javax.swing.plaf.ComponentUI |
---|
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MONTH_DOWN
public static final int MONTH_UP
protected final java.text.SimpleDateFormat dayOfMonthFormatter
protected java.lang.String[] monthsOfTheYear
protected JXMonthView monthView
protected java.awt.Font derivedFont
protected boolean isLeftToRight
protected javax.swing.Icon monthUpImage
protected javax.swing.Icon monthDownImage
protected java.awt.Rectangle calendarGrid
Constructor Detail |
---|
public BasicMonthViewUI()
Method Detail |
---|
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
public void installUI(javax.swing.JComponent c)
installUI
in class javax.swing.plaf.ComponentUI
public void uninstallUI(javax.swing.JComponent c)
uninstallUI
in class javax.swing.plaf.ComponentUI
protected void installComponents()
protected void uninstallComponents()
protected void installDefaults()
protected void uninstallDefaults()
protected void installKeyboardActions()
protected void uninstallKeyboardActions()
protected void installListeners()
protected void uninstallListeners()
protected void updateComponentInputMap()
JXMonthView.isComponentInputMapEnabled()
protected void updateLocale()
public java.lang.String[] getDaysOfTheWeek()
MonthViewUI
getDaysOfTheWeek
in class MonthViewUI
protected java.awt.Font createDerivedFont()
protected java.beans.PropertyChangeListener createPropertyChangeListener()
protected java.awt.LayoutManager createLayoutManager()
protected java.awt.event.MouseListener createMouseListener()
protected java.awt.event.MouseMotionListener createMouseMotionListener()
public boolean isUsingKeyboard()
public void setUsingKeyboard(boolean val)
protected java.awt.Rectangle getDayBoundsAtLocation(int x, int y)
Note: this is a pure geometric mapping. The returned rectangle need not necessarily map to a date in the month which contains the location, it can represent a week-number/column header or a leading/trailing date.
x
- the x position of the location in pixely
- the y position of the location in pixel
protected java.awt.Point getDayGridPositionAtLocation(int x, int y)
Note: this is a pure geometric mapping. The returned grid position need not necessarily map to a date in the month which contains the location, it can represent a week-number/column header or a leading/trailing date.
x
- the x position of the location in pixely
- the y position of the location in pixel
protected java.awt.Point getDayGridPosition(java.util.Date date)
date
- the Date to get the logical position for, must not be null.
public java.util.Date getDayAtLocation(int x, int y)
getDayAtLocation
in class MonthViewUI
x
- the x position of the location in pixely
- the y position of the location in pixel
protected java.awt.Rectangle getDayBounds(java.util.Date date)
PENDING JW: this most probably should be public as it is the logical reverse of getDayAtLocation
date
- the Date to return the bounds for. Must not be null.
protected java.util.Date getDayInMonth(java.util.Date month, int row, int column)
PENDING JW: relax the startOfMonth pre? Why did I require it?
month
- a calendar representing the first day of the month, must not
be null.row
- the logical row index in the day grid of the monthcolumn
- the logical column index in the day grid of the month
java.lang.IllegalStateException
- if the month is not the start of the month.protected int getTraversableGridPositionAtLocation(int x, int y)
PENDING JW: define the "action grid". Currently this replaces the old version to remove all internal usage of deprecated methods.
x
- the x position of the location in pixely
- the y position of the location in pixel
protected java.awt.Rectangle getMonthHeaderBoundsAtLocation(int x, int y)
x
- the x position of the location in pixely
- the y position of the location in pixel
protected java.awt.Rectangle getMonthBoundsAtLocation(int x, int y)
Mapping pixel to bounds.
x
- the x position of the location in pixely
- the y position of the location in pixel
protected java.awt.Point getMonthGridPositionAtLocation(int x, int y)
Mapping pixel to logical grid coordinates.
x
- the x position of the location in pixely
- the y position of the location in pixel
protected java.util.Date getMonthAtLocation(int x, int y)
Mapping pixel to calendar day.
x
- the x position of the location in pixely
- the y position of the location in pixel
protected java.util.Date getMonth(int row, int column)
Mapping logical grid coordinates to Calendar.
row
- the rowIndex in the grid of months.column
- the columnIndex in the grid months.
getMonthGridPosition(Date)
protected java.awt.Point getMonthGridPosition(java.util.Date date)
date
- the Date to return the bounds for. Must not be null.
getMonth(int, int)
,
getMonthBounds(int, int)
protected java.awt.Rectangle getMonthBounds(int row, int column)
Mapping logical grip position to pixel.
row
- the rowIndex in the grid of months.column
- the columnIndex in the grid months.
getMonthGridPositionAtLocation(int, int)
,
getMonthBoundsAtLocation(int, int)
protected java.awt.Rectangle getMonthBounds(java.util.Date date)
Mapping Date to pixel.
date
- the Date to return the bounds for. Must not be null.
getMonthAtLocation(int, int)
protected java.awt.Dimension getMonthSize()
protected java.awt.Dimension getDaySize()
protected int getMonthHeaderHeight()
public void paint(java.awt.Graphics g, javax.swing.JComponent c)
paint
in class javax.swing.plaf.ComponentUI
protected void paintMonth(java.awt.Graphics g, int x, int y, int width, int height, java.util.Calendar calendar)
Note: the given calendar must not be changed.
g
- Graphics object.x
- x location of monthy
- y location of monthwidth
- width of monthheight
- height of monthcalendar
- the calendar specifying the the first day of the month to paint,
must not be nullprotected void paintDays(java.awt.Graphics g, int left, int top, int width, java.util.Calendar cal)
Note: the calendar must not be changed.
g
- Graphics object.left
- the left boundary of the day grid.top
- the upper boundary of the day gridwidth
- the width of the day grid.cal
- the calendar specifying the the first day of the month to paint,
must not be nullprotected void paintDay(java.awt.Graphics g, int left, int top, java.util.Calendar calendar)
Note: the given calendar must not be changed.
g
- the Graphics to paint into.left
- the left boundary of the day-box to paint.top
- the upper boundary of the day-box to paint.calendar
- the calendar specifying the the day to paint, must not be
nullprotected void paintTrailingDay(java.awt.Graphics g, int left, int top, java.util.Calendar calendar)
Note: the given calendar must not be changed.
g
- the Graphics to paint into.left
- the left boundary of the day-box to paint.top
- the upper boundary of the day-box to paint.calendar
- the calendar specifying the the day to paint, must not be
nullprotected void paintLeadingDay(java.awt.Graphics g, int left, int top, java.util.Calendar calendar)
Note: the given calendar must not be changed.
g
- the Graphics to paint into.left
- the left boundary of the day-box to paint.top
- the upper boundary of the day-box to paint.calendar
- the calendar specifying the the day to paint, must not be
nullprotected int getWeeks(java.util.Calendar month)
month
- the calendar specifying the the first day of the month to
paint, must not be null
protected void paintWeeksOfYear(java.awt.Graphics g, int x, int initialY, int width, java.util.Calendar cal)
g
- Graphics object.x
- x location of monthinitialY
- y the upper bound of the "weekNumbers-box"width
- width of monthcal
- the calendar specifying the the first day of the month to paint,
must not be nullprotected void paintDayOfTheWeekBackground(java.awt.Graphics g, int x, int y, int width, int height, java.util.Calendar cal)
protected void paintWeekOfYearBackground(java.awt.Graphics g, int x, int y, int width, int height, java.util.Calendar cal)
protected void paintWeekOfYearForeground(java.awt.Graphics g, int x, int y, int width, int height, java.util.Calendar cal)
Note: the given calendar must not be changed.
g
- Graphics objectx
- x-coordinate of upper left corner.y
- y-coordinate of upper left corner.width
- width of bounding boxheight
- height of bounding boxprotected void paintMonthStringBackground(java.awt.Graphics g, int x, int y, int width, int height, java.util.Calendar cal)
g
- Graphics object to paint to.x
- x-coordinate of upper left corner.y
- y-coordinate of upper left corner.width
- width of the bounding box.height
- height of the bounding box.JXMonthView.setMonthStringBackground(java.awt.Color)
,
JXMonthView.setMonthStringInsets(java.awt.Insets)
protected void paintMonthStringForeground(java.awt.Graphics g, int x, int y, int width, int height, java.util.Calendar cal)
g
- Graphics object to paint to.x
- x-coordinate of upper left corner.y
- y-coordinate of upper left corner.width
- width of the bounding box.height
- height of the bounding box.cal
- the calendar specifying the day to use, must not be nullprotected void paintMonthStringForeground(java.awt.Graphics g, java.lang.String monthName, int monthX, int monthY, java.lang.String yearName, int yearX, int yearY, java.util.Calendar cal)
Note: the given calendar must not be changed.
g
- Graphics to paint into.monthName
- Name of the month.monthX
- Month string x coordinate.monthY
- Month string y coordinate.yearName
- Name (number) of the year.yearX
- Year string x coordinate.yearY
- Year string y coordinate.protected void paintDayBackground(java.awt.Graphics g, int x, int y, int width, int height, java.util.Calendar cal)
Note: the given calendar must not be changed.
g
- Graphics object to paint tox
- x-coordinate of upper left cornery
- y-coordinate of upper left cornerwidth
- width of bounding box for the dayheight
- height of bounding box for the daycal
- the calendar specifying the day to paint, must not be nullorg.jdesktop.swingx.JXMonthView#isSelectedDate
,
isToday(java.util.Date)
protected void paintDayForeground(java.awt.Graphics g, int x, int y, int width, int height, java.util.Calendar cal)
Note: the given calendar must not be changed.
g
- Graphics object to paint tox
- x-coordinate of upper left cornery
- y-coordinate of upper left cornerwidth
- width of bounding box for the dayheight
- height of bounding box for the daycal
- the calendar specifying the day to paint, must not be nullprotected void paintDayForeground(java.awt.Graphics g, java.lang.String numericDay, int x, int y, java.util.Calendar cal)
Note: the given calendar must not be changed.
g
- Graphics to paint on.numericDay
- Text representation of the day.x
- X coordinate of the upper right corner.y
- Y coordinate of the upper right corner.protected void paintFlaggedDayBackground(java.awt.Graphics g, int x, int y, int width, int height, java.util.Calendar cal)
paintDayBackground
.
Note: the given calendar must not be changed.
g
- Graphics object to paint tox
- x-coordinate of upper left cornery
- y-coordinate of upper left cornerwidth
- width of bounding box for the dayheight
- height of bounding box for the daycal
- the calendar specifying the day to paint, must not be nullprotected void paintFlaggedDayForeground(java.awt.Graphics g, int x, int y, int width, int height, java.util.Calendar cal)
Note: the given calendar must not be changed.
g
- Graphics object to paint tox
- x-coordinate of upper left cornery
- y-coordinate of upper left cornerwidth
- width of bounding box for the dayheight
- height of bounding box for the daycal
- the calendar specifying the day to paint, must not be nullprotected void paintUnselectableDayBackground(java.awt.Graphics g, int x, int y, int width, int height, java.util.Calendar cal)
Note: the given calendar must not be changed.
g
- Graphics object to paint tox
- x-coordinate of upper left cornery
- y-coordinate of upper left cornerwidth
- width of bounding box for the dayheight
- height of bounding box for the daycal
- the calendar specifying the day to paint, must not be nullprotected void paintUnselectableDayForeground(java.awt.Graphics g, int x, int y, int width, int height, java.util.Calendar cal)
Note: the given calendar must not be changed.
g
- Graphics object to paint tox
- x-coordinate of upper left cornery
- y-coordinate of upper left cornerwidth
- width of bounding box for the dayheight
- height of bounding box for the daycal
- the calendar specifying the day to paint, must not be nullprotected void paintLeadingDayBackground(java.awt.Graphics g, int x, int y, int width, int height, java.util.Calendar cal)
Note: the given calendar must not be changed.
g
- Graphics object to paint tox
- x-coordinate of upper left cornery
- y-coordinate of upper left cornerwidth
- width of bounding box for the dayheight
- height of bounding box for the daycal
- the calendar specifying the day to paint, must not be nullprotected void paintLeadingDayForeground(java.awt.Graphics g, int x, int y, int width, int height, java.util.Calendar cal)
Note: the given calendar must not be changed.
g
- Graphics object to paint tox
- x-coordinate of upper left cornery
- y-coordinate of upper left cornerwidth
- width of bounding box for the dayheight
- height of bounding box for the daycal
- the calendar specifying the day to paint, must not be nullprotected void paintTrailingDayBackground(java.awt.Graphics g, int x, int y, int width, int height, java.util.Calendar cal)
Note: the given calendar must not be changed.
g
- Graphics object to paint tox
- x-coordinate of upper left cornery
- y-coordinate of upper left cornerwidth
- width of bounding box for the dayheight
- height of bounding box for the daycal
- the calendar specifying the day to paint, must not be nullprotected void paintTrailingDayForeground(java.awt.Graphics g, int x, int y, int width, int height, java.util.Calendar cal)
Note: the given calendar must not be changed.
g
- Graphics object to paint tox
- x-coordinate of upper left cornery
- y-coordinate of upper left cornerwidth
- width of bounding box for the dayheight
- height of bounding box for the daycal
- the calendar specifying the day to paint, must not be nullprotected void paintBackground(java.awt.Rectangle clip, java.awt.Graphics g)
protected java.util.Calendar getCalendar()
protected java.util.Calendar getCalendar(java.util.Date date)
date
- the date to configure the calendar with
public java.util.Date getLastDisplayedDay()
It's up to the UI to keep this property, based on internal state and the firstDisplayed as controlled by the JXMonthView.
getLastDisplayedDay
in class MonthViewUI
protected void setFirstDisplayedDay(java.util.Date firstDisplayedDate)
firstDisplayedDate
- the firstDisplayedDate to setprotected java.util.Date getFirstDisplayedDay()
protected int getFirstDisplayedMonth()
protected int getFirstDisplayedYear()
protected java.util.SortedSet<java.util.Date> getSelection()
protected java.util.Date getToday()
protected boolean isToday(java.util.Date date)
date
- long representing the date you want to compare to today.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |