@Test public void testMonthBoundsNullDate() { if (GraphicsEnvironment.isHeadless()) { LOG.fine("cannot run test - headless environment"); return; } BasicMonthViewUI ui = getRealizedMonthViewUI(ComponentOrientation.LEFT_TO_RIGHT); try { ui.getMonthBounds(null); fail("date param null is not allowed - must fire NPE"); } catch (NullPointerException ex) { } }
protected Rectangle getMonthBounds(int row, int column) { int startY = calendarGrid.y + row * fullCalendarHeight; int startX = calendarGrid.x + column * fullCalendarWidth; if (!isLeftToRight) { startX = calendarGrid.x + (calendarColumnCount - 1 - column) * fullCalendarWidth; } return new Rectangle(startX, startY, calendarWidth, calendarHeight); }
BasicMonthViewUI extends MonthViewUI { protected Rectangle getMonthBounds(int row, int column) { int startY = calendarGrid.y + row * fullCalendarHeight; int startX = calendarGrid.x + column * fullCalendarWidth; if (!isLeftToRight) { startX = calendarGrid.x + (calendarColumnCount - 1 - column) * fullCalendarWidth; } return new Rectangle(startX, startY, calendarWidth, calendarHeight); } }
BasicMonthViewUI extends MonthViewUI { protected Rectangle getMonthBounds(int row, int column) { int startY = calendarGrid.y + row * fullCalendarHeight; int startX = calendarGrid.x + column * fullCalendarWidth; if (!isLeftToRight) { startX = calendarGrid.x + (calendarColumnCount - 1 - column) * fullCalendarWidth; } return new Rectangle(startX, startY, calendarWidth, calendarHeight); }  }
BasicMonthViewUI extends MonthViewUI { protected Rectangle getMonthBounds(int row, int column) { int startY = calendarGrid.y + row * fullCalendarHeight; int startX = calendarGrid.x + column * fullCalendarWidth; if (!isLeftToRight) { startX = calendarGrid.x + (calendarColumnCount - 1 - column) * fullCalendarWidth; } return new Rectangle(startX, startY, calendarWidth, calendarHeight); }  @SuppressWarnings({ "UnusedDeclaration" }) static ComponentUI createUI(JComponent c); @Override void installUI(JComponent c); @Override void uninstallUI(JComponent c); @Override String[] getDaysOfTheWeek(); boolean isUsingKeyboard(); void setUsingKeyboard(boolean val); @Override Date getDayAtLocation(int x, int y); boolean isWeekOfYearCell(int x, int y); @Override void update(Graphics g, JComponent c); @Override void paint(Graphics g, JComponent c); @Override Date getLastDisplayedDay(); }
BasicMonthViewUI extends MonthViewUI { protected Rectangle getMonthBounds(int row, int column) { int startY = calendarGrid.y + row * fullCalendarHeight; int startX = calendarGrid.x + column * fullCalendarWidth; if (!isLeftToRight) { startX = calendarGrid.x + (calendarColumnCount - 1 - column) * fullCalendarWidth; } return new Rectangle(startX, startY, calendarWidth, calendarHeight); }  @SuppressWarnings({ "UnusedDeclaration" }) static ComponentUI createUI(JComponent c); @Override void installUI(JComponent c); @Override void uninstallUI(JComponent c); @Override String[] getDaysOfTheWeek(); boolean isUsingKeyboard(); void setUsingKeyboard(boolean val); @Override Date getDayAtLocation(int x, int y); boolean isWeekOfYearCell(int x, int y); @Override void update(Graphics g, JComponent c); @Override void paint(Graphics g, JComponent c); @Override Date getLastDisplayedDay(); static final int MONTH_DOWN; static final int MONTH_UP; }