Tabnine Logo
DateChooserPanel.constructControlPanel
Code IndexAdd Tabnine to your IDE (free)

How to use
constructControlPanel
method
in
org.jfree.ui.DateChooserPanel

Best Java code snippets using org.jfree.ui.DateChooserPanel.constructControlPanel (Showing top 3 results out of 315)

origin: jfree/jcommon

/**
 * Constructs a new date chooser panel.
 *
 * @param calendar     the calendar controlling the date.
 * @param controlPanel a flag that indicates whether or not the 'today' 
 *                     button should appear on the panel.
 */
public DateChooserPanel(final Calendar calendar, 
            final boolean controlPanel) {
  super(new BorderLayout());
  this.chosenDateButtonColor = UIManager.getColor("textHighlight");
  this.chosenMonthButtonColor = UIManager.getColor("control");
  this.chosenOtherButtonColor = UIManager.getColor("controlShadow");
  // the default date is today...
  this.chosenDate = calendar;
  this.firstDayOfWeek = calendar.getFirstDayOfWeek();
  this.WEEK_DAYS = new int[7];
  for (int i = 0; i < 7; i++) {
    this.WEEK_DAYS[i] = ((this.firstDayOfWeek + i - 1) % 7) + 1;
  }
  add(constructSelectionPanel(), BorderLayout.NORTH);
  add(getCalendarPanel(), BorderLayout.CENTER);
  if (controlPanel) {
    add(constructControlPanel(), BorderLayout.SOUTH);
  }
  setDate(calendar.getTime());
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Constructs a new date chooser panel.
 *
 * @param calendar     the calendar controlling the date.
 * @param controlPanel a flag that indicates whether or not the 'today' 
 *                     button should appear on the panel.
 */
public DateChooserPanel(final Calendar calendar, 
            final boolean controlPanel) {
  super(new BorderLayout());
  this.chosenDateButtonColor = UIManager.getColor("textHighlight");
  this.chosenMonthButtonColor = UIManager.getColor("control");
  this.chosenOtherButtonColor = UIManager.getColor("controlShadow");
  // the default date is today...
  this.chosenDate = calendar;
  this.firstDayOfWeek = calendar.getFirstDayOfWeek();
  this.WEEK_DAYS = new int[7];
  for (int i = 0; i < 7; i++) {
    this.WEEK_DAYS[i] = ((this.firstDayOfWeek + i - 1) % 7) + 1;
  }
  add(constructSelectionPanel(), BorderLayout.NORTH);
  add(getCalendarPanel(), BorderLayout.CENTER);
  if (controlPanel) {
    add(constructControlPanel(), BorderLayout.SOUTH);
  }
  setDate(calendar.getTime());
}
origin: org.jfree/jcommon

/**
 * Constructs a new date chooser panel.
 *
 * @param calendar     the calendar controlling the date.
 * @param controlPanel a flag that indicates whether or not the 'today' 
 *                     button should appear on the panel.
 */
public DateChooserPanel(final Calendar calendar, 
            final boolean controlPanel) {
  super(new BorderLayout());
  this.chosenDateButtonColor = UIManager.getColor("textHighlight");
  this.chosenMonthButtonColor = UIManager.getColor("control");
  this.chosenOtherButtonColor = UIManager.getColor("controlShadow");
  // the default date is today...
  this.chosenDate = calendar;
  this.firstDayOfWeek = calendar.getFirstDayOfWeek();
  this.WEEK_DAYS = new int[7];
  for (int i = 0; i < 7; i++) {
    this.WEEK_DAYS[i] = ((this.firstDayOfWeek + i - 1) % 7) + 1;
  }
  add(constructSelectionPanel(), BorderLayout.NORTH);
  add(getCalendarPanel(), BorderLayout.CENTER);
  if (controlPanel) {
    add(constructControlPanel(), BorderLayout.SOUTH);
  }
  setDate(calendar.getTime());
}
org.jfree.uiDateChooserPanelconstructControlPanel

Javadoc

Returns a panel that appears at the bottom of the calendar panel - contains a button for selecting today's date.

Popular methods of DateChooserPanel

  • add
  • constructSelectionPanel
    Constructs a panel containing two JComboBoxes (for the month and year) and a button (to reset the da
  • equalDates
    Returns true if the two dates are equal (time of day is ignored).
  • firePropertyChange
  • getButtonColor
    Returns the button color according to the specified date.
  • getCalendarPanel
    Returns a panel of buttons, each button representing a day in the month. This is a sub-component of
  • getFirstDayOfWeek
    Returns the first day of the week (controls the labels in the date panel).
  • getFirstVisibleDate
    Returns the first date that is visible in the grid. This should always be in the month preceding the
  • getYears
    Returns a vector of years preceding and following the specified year. The number of years preceding
  • refreshButtons
    Update the button labels and colors to reflect date selection.
  • refreshYearSelector
    Changes the contents of the year selection JComboBox to reflect the chosen date and the year range.
  • setDate
    Sets the date chosen in the panel.
  • refreshYearSelector,
  • setDate,
  • <init>

Popular in Java

  • Running tasks concurrently on multiple threads
  • onCreateOptionsMenu (Activity)
  • getSharedPreferences (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • String (java.lang)
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • JFrame (javax.swing)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • IsNull (org.hamcrest.core)
    Is the value null?
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now