Interface ISettings

All Known Implementing Classes:
AbstractSettings, DefaultSettings

public interface ISettings
  • Method Details

    • getCalendarWidth

      int getCalendarWidth()
      Returns the width of the calendar.
      Returns:
      Calendar width
    • getCalendarHeight

      int getCalendarHeight()
      Returns the height of the calendar.
      Returns:
      Calendar height
    • getCalendarWidthMacintosh

      int getCalendarWidthMacintosh()
      CALLED ON MACINTOSH ONLY! Returns the width of the calendar.
      Returns:
      Calendar width
    • getCalendarHeightMacintosh

      int getCalendarHeightMacintosh()
      CALLED ON MACINTOSH ONLY! Returns the height of the calendar.
      Returns:
      Calendar height
    • getHeaderLeftMargin

      int getHeaderLeftMargin()
      Returns the left margin size of the header.
      Returns:
      Left margin width
    • getHeaderRightMargin

      int getHeaderRightMargin()
      Returns the right margin size of the header.
      Returns:
      Right margin width
    • getHeaderTopMargin

      int getHeaderTopMargin()
      Returns the top margin size of the header.
      Returns:
      Top margin width
    • getHeaderHeight

      int getHeaderHeight()
      Returns the height of the header.
      Returns:
      Header height
    • getArrowLeftSpacing

      int getArrowLeftSpacing()
      Returns the left spacing before the arrow.
      Returns:
      Left arrow spacing
    • getArrowTopSpacing

      int getArrowTopSpacing()
      Returns the top margin size of the arrows.
      Returns:
      Top arrow spacing
    • getDatesLeftMargin

      int getDatesLeftMargin()
      Returns the left margin size where the dates are shown.
      Returns:
      Dates left margin width
    • getDatesRightMargin

      int getDatesRightMargin()
      Returns the right margin size where the dates are shown.
      Returns:
      Dates right margin width
    • getOneDateBoxSize

      int getOneDateBoxSize()
      Returns the size (width) of the box that one date is contained in.
      Returns:
      Calendar day box size
    • getBoxSpacer

      int getBoxSpacer()
      Returns the width between each calendar date.
      Returns:
      Calendar date spacer width
    • showCalendarInRightCorner

      boolean showCalendarInRightCorner()
      True if the calendar should be drawn with the right hand side of the calendar aligned with the drop down button. False if it should be aligned in the opposite way.
      Returns:
      True to align in right corner
    • getDateFormat

      java.lang.String getDateFormat()
      Returns the date format to be used in the text display area. Please note that this does not support just any format. You need to stick to Month Day and Year related formats and no others.
      Returns:
      Date format string
      See Also:
      DateFormat
    • getButtonHeight

      int getButtonHeight()
      Returns the height of the "Today" and "None" buttons.
      Returns:
      Height
    • getButtonWidth

      int getButtonWidth()
      Returns the width of the "Today" and "None" buttons.
      Returns:
      Width
    • getButtonWidthCarbon

      int getButtonWidthCarbon()
      Returns the width of the "Today" and "None" buttons for Carbon.
      Returns:
      Width
    • getCarbonButtonHeight

      int getCarbonButtonHeight()
      Returns the height of the "Today" and "None" buttons for Carbon.
      Returns:
      Height
    • getButtonVerticalSpace

      int getButtonVerticalSpace()
      Returns the spacing between the bottom of the calendar dates and where the "Today" and "None" buttons are.
      Returns:
      Spacer size
    • getCarbonButtonVerticalSpace

      int getCarbonButtonVerticalSpace()
      Returns the spacing between the bottom of the calendar dates and where the "Today" and "None" buttons are. Used on Carbon only.
      Returns:
      Spacer size
    • getButtonsHorizontalSpace

      int getButtonsHorizontalSpace()
      Returns the horizontal spacing between the "Today" and the "None" button.
      Returns:
      Space size
    • getCarbonButtonsHorizontalSpace

      int getCarbonButtonsHorizontalSpace()
      Returns the horizontal spacing between the "Today" and the "None" button. Used on Carbon only.
      Returns:
      Space size
    • getTodayText

      java.lang.String getTodayText()
      Returns the text written on the "Today" button
      Returns:
      String
    • getNoneText

      java.lang.String getNoneText()
      Returns the text written on the "None" button
      Returns:
      String
    • getNoDateSetText

      java.lang.String getNoDateSetText()
      Returns the text shown in the text area of the combo when there is no date selected. It's suggested you return a blank string "" (which is the default).
      Returns:
      String (never null!)
    • showMonthPickerOnMonthNameMousePress

      boolean showMonthPickerOnMonthNameMousePress()
      Whether to show the month selector pop-up when the mouse is pressed and held on the month name in the calendar window. The month popup is a small borderless window that allows the user to quickly select a month in the future or past by holding down the mouse button and moving the pointer either up (to scroll into the past) or down (to scroll into the future). Please refer to the Microsoft Outlook calendar for a visual reference.
      Returns:
      true if to show the dialog. Default is true.
    • getWindowsButtonWidth

      int getWindowsButtonWidth()
      Returns the arrow width of the combo button itself for Windows.

      IMPORTANT:
      This does not change the combo button size, it is used to determine when the user clicks the arrow button on the combo and not the text field. If you notice that there is some area of the button that is either too large or small when clicked so that the popup does not show, you will probably need to adjust this.
      Returns:
      size that the current OS. Defaults are: OSX: 25, Windows: 19, GTK: 25.
    • getCarbonButtonWidth

      int getCarbonButtonWidth()
      Returns the arrow width of the combo button itself for Carbon.

      IMPORTANT:
      This does not change the combo button size, it is used to determine when the user clicks the arrow button on the combo and not the text field. If you notice that there is some area of the button that is either too large or small when clicked so that the popup does not show, you will probably need to adjust this.
      Returns:
      size that the current OS. Defaults are: OSX: 25, Windows: 19, GTK: 25.
    • getGTKButtonWidth

      int getGTKButtonWidth()
      Returns the arrow width of the combo button itself for GTK.

      IMPORTANT:
      This does not change the combo button size, it is used to determine when the user clicks the arrow button on the combo and not the text field. If you notice that there is some area of the button that is either too large or small when clicked so that the popup does not show, you will probably need to adjust this.
      Returns:
      size that the current OS. Defaults are: OSX: 25, Windows: 19, GTK: 25.
    • getLocale

      java.util.Locale getLocale()
      Returns the Locale that the calendar should use when calculating dates etc.
      Returns:
      Locale to use. Default is Locale.getDefault(). Return value may not be null.
    • getCarbonDrawFont

      org.eclipse.swt.graphics.Font getCarbonDrawFont()
      Returns the font to draw on Carbon. Do note that the drawing does not take font size into account, so change at your own risk.
      Returns:
      Font to be used on Carbon.
    • getWindowsMonthPopupDrawFont

      org.eclipse.swt.graphics.Font getWindowsMonthPopupDrawFont()
      Returns the font used to draw the month selector text on Windows. It is not advised to change this setting.
      Returns:
      Font to be used in the month popup on Windows.
    • getAdditionalDateFormats

      java.util.List getAdditionalDateFormats()
      Returns a list of date formats that can be parsed into a Date. For example, if this list contains "mmddYY" and the user types in the date 030508 the date will be parsed into the date and displayed and formatted according to the getDateFormat() value automatically. The order of this list is relevant as the first matched date that "works" will be used as the date. This list is only used as a last resort if all other date parses failed.
      Returns:
      List of dateformats. Default is an empty list.
      See Also:
      DateFormat, getDateFormat()
    • keyboardNavigatesCalendar

      boolean keyboardNavigatesCalendar()
      If it returns true, keyboard down key etc will open the calendar and navigate the calendar through the keyboard. If it returns false, keyboard will instead navigate the various text parts of the calendar, so if the date in the box is 12/13/2008 and the cursor is on the "13" and arrow up/down are pressed, that number will increase. Default is true.
    • getAcceptedDateSeparatorChars

      char[] getAcceptedDateSeparatorChars()
      Returns a list of chars that can be used to separate dates. If your users enter characters other than / - . you will want to override this and add whatever character is missing. These are used when parsing the date in the box when the user hits the arrow up/down buttons or + - on mac. Do note that if the default date format returned by the settings has no separator characters in them, this method is not called as it would not make sense.
      Returns:
      char array, default is '/', '.', '-'
    • getCarbonArrowUpChar

      char getCarbonArrowUpChar()
      On OSX/Carbon the arrow up/down don't work due to an eclipse bug so they need alternative keys. You may re-define those keys here if you wish. By default Carbon uses + - instead of the arrows. Do note that this method only matters if keyboardNavigatesCalendar() returns true.
      Returns:
      Arrow up replacement for carbon. Default is '-'.
    • getCarbonArrowDownChar

      char getCarbonArrowDownChar()
      On OSX/Carbon the arrow up/down don't work due to an eclipse bug so they need alternative keys. You may re-define those keys here if you wish. By default Carbon uses + - instead of the arrows. Do note that this method only matters if keyboardNavigatesCalendar() returns true.
      Returns:
      Arrow down replacement for carbon. Default is '+'.