/** * Sets the color used to draw the bounding box around today. The default * is the background of the <code>JXMonthView</code> component. * * @param c color to set */ public void setTodayBackground(Color c) { Color oldValue = getTodayBackground(); todayBackgroundColor = c; firePropertyChange("todayBackground", oldValue, getTodayBackground()); // PENDING JW: remove repaint, ui must take care of it repaint(); }
/** * Sets the color used to draw the bounding box around today. The default * is the background of the <code>JXMonthView</code> component. * * @param c color to set */ public void setTodayBackground(Color c) { Color oldValue = getTodayBackground(); todayBackgroundColor = c; firePropertyChange("todayBackground", oldValue, getTodayBackground()); // PENDING JW: remove repaint, ui must take care of it repaint(); }
/** * Sets the color used to draw the bounding box around today. The default * is the background of the <code>JXMonthView</code> component. * * @param c color to set */ public void setTodayBackground(Color c) { Color oldValue = getTodayBackground(); todayBackgroundColor = c; firePropertyChange("todayBackground", oldValue, getTodayBackground()); // PENDING JW: remove repaint, ui must take care of it repaint(); }
/** * Sets the color used to draw the bounding box around today. The default * is the background of the <code>JXMonthView</code> component. * * @param c color to set */ public void setTodayBackground(Color c) { Color oldValue = getTodayBackground(); todayBackgroundColor = c; firePropertyChange("todayBackground", oldValue, getTodayBackground()); // PENDING JW: remove repaint, ui must take care of it repaint(); }
/** * Sets the color used to draw the bounding box around today. The default * is the background of the <code>JXMonthView</code> component. * * @param c color to set */ public void setTodayBackground(Color c) { Color oldValue = getTodayBackground(); todayBackgroundColor = c; firePropertyChange("todayBackground", oldValue, getTodayBackground()); // PENDING JW: remove repaint, ui must take care of it repaint(); }
graphics.setColor(monthView.getTodayBackground()); graphics.drawRect(bounds.x, bounds.y, bounds.width - 1, bounds.height - 1);
@Override protected Border getBorder() { if (getComponent() == null) { return super.getBorder(); } if (CalendarState.TITLE == dayState) { return getTitleBorder(); } if (isToday()) { int x = getComponent().getBoxPaddingX(); int y = getComponent().getBoxPaddingY(); Border todayBorder = BorderFactory.createLineBorder(getComponent().getTodayBackground()); Border empty = BorderFactory.createEmptyBorder(y - 1, x - 1, y - 1, x -1); return BorderFactory.createCompoundBorder(todayBorder, empty); } return BorderFactory.createEmptyBorder(getComponent().getBoxPaddingY(), getComponent().getBoxPaddingX(), getComponent().getBoxPaddingY(), getComponent().getBoxPaddingX()); }
@Override protected Border getBorder() { if (getComponent() == null) { return super.getBorder(); } if (CalendarState.TITLE == dayState) { return getTitleBorder(); } if (isToday()) { int x = getComponent().getBoxPaddingX(); int y = getComponent().getBoxPaddingY(); Border todayBorder = BorderFactory.createLineBorder(getComponent().getTodayBackground()); Border empty = BorderFactory.createEmptyBorder(y - 1, x - 1, y - 1, x -1); return BorderFactory.createCompoundBorder(todayBorder, empty); } return BorderFactory.createEmptyBorder(getComponent().getBoxPaddingY(), getComponent().getBoxPaddingX(), getComponent().getBoxPaddingY(), getComponent().getBoxPaddingX()); }
@Override protected Border getBorder() { if (getComponent() == null) { return super.getBorder(); } if (CalendarState.TITLE == dayState) { return getTitleBorder(); } if (isToday()) { int x = getComponent().getBoxPaddingX(); int y = getComponent().getBoxPaddingY(); Border todayBorder = BorderFactory.createLineBorder(getComponent().getTodayBackground()); Border empty = BorderFactory.createEmptyBorder(y - 1, x - 1, y - 1, x -1); return BorderFactory.createCompoundBorder(todayBorder, empty); } return BorderFactory.createEmptyBorder(getComponent().getBoxPaddingY(), getComponent().getBoxPaddingX(), getComponent().getBoxPaddingY(), getComponent().getBoxPaddingX()); }
@Override protected Border getBorder() { if (getComponent() == null) { return super.getBorder(); } if (CalendarState.TITLE == dayState) { return getTitleBorder(); } if (isToday()) { int x = getComponent().getBoxPaddingX(); int y = getComponent().getBoxPaddingY(); Border todayBorder = BorderFactory.createLineBorder(getComponent().getTodayBackground()); Border empty = BorderFactory.createEmptyBorder(y - 1, x - 1, y - 1, x -1); return BorderFactory.createCompoundBorder(todayBorder, empty); } return BorderFactory.createEmptyBorder(getComponent().getBoxPaddingY(), getComponent().getBoxPaddingX(), getComponent().getBoxPaddingY(), getComponent().getBoxPaddingX()); }
@Override protected Border getBorder() { if (getComponent() == null) { return super.getBorder(); } if (CalendarState.TITLE == dayState) { return getTitleBorder(); } if (isToday()) { int x = getComponent().getBoxPaddingX(); int y = getComponent().getBoxPaddingY(); Border todayBorder = BorderFactory.createLineBorder(getComponent().getTodayBackground()); Border empty = BorderFactory.createEmptyBorder(y - 1, x - 1, y - 1, x -1); return BorderFactory.createCompoundBorder(todayBorder, empty); } return BorderFactory.createEmptyBorder(getComponent().getBoxPaddingY(), getComponent().getBoxPaddingX(), getComponent().getBoxPaddingY(), getComponent().getBoxPaddingX()); }