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

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

Best Java code snippets using org.jfree.ui.DateChooserPanel.add (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.uiDateChooserPaneladd

Popular methods of DateChooserPanel

  • constructControlPanel
    Returns a panel that appears at the bottom of the calendar panel - contains a button for selecting t
  • 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

  • Creating JSON documents from java classes using gson
  • onRequestPermissionsResult (Fragment)
  • requestLocationUpdates (LocationManager)
  • onCreateOptionsMenu (Activity)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • JFileChooser (javax.swing)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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