/** * Sets the number of pixels used to pad the top and bottom of a day. * The padding is applied to both the top and bottom of a day. Therefore, * if you used the padding value of 3, the number of pixels between any * two days would be 6. * * @param boxPaddingY Number of pixels applied to top and bottom of a day */ public void setBoxPaddingY(int boxPaddingY) { int oldBoxPadding = getBoxPaddingY(); this.boxPaddingY = boxPaddingY; firePropertyChange(BOX_PADDING_Y, oldBoxPadding, getBoxPaddingY()); }
/** * Sets the number of pixels used to pad the top and bottom of a day. * The padding is applied to both the top and bottom of a day. Therefore, * if you used the padding value of 3, the number of pixels between any * two days would be 6. * * @param boxPaddingY Number of pixels applied to top and bottom of a day */ public void setBoxPaddingY(int boxPaddingY) { int oldBoxPadding = getBoxPaddingY(); this.boxPaddingY = boxPaddingY; firePropertyChange(BOX_PADDING_Y, oldBoxPadding, getBoxPaddingY()); }
/** * Sets the number of pixels used to pad the top and bottom of a day. * The padding is applied to both the top and bottom of a day. Therefore, * if you used the padding value of 3, the number of pixels between any * two days would be 6. * * @param boxPaddingY Number of pixels applied to top and bottom of a day */ public void setBoxPaddingY(int boxPaddingY) { int oldBoxPadding = getBoxPaddingY(); this.boxPaddingY = boxPaddingY; firePropertyChange(BOX_PADDING_Y, oldBoxPadding, getBoxPaddingY()); }
/** * Sets the number of pixels used to pad the top and bottom of a day. * The padding is applied to both the top and bottom of a day. Therefore, * if you used the padding value of 3, the number of pixels between any * two days would be 6. * * @param boxPaddingY Number of pixels applied to top and bottom of a day */ public void setBoxPaddingY(int boxPaddingY) { int oldBoxPadding = getBoxPaddingY(); this.boxPaddingY = boxPaddingY; firePropertyChange(BOX_PADDING_Y, oldBoxPadding, getBoxPaddingY()); }
/** * Sets the number of pixels used to pad the top and bottom of a day. * The padding is applied to both the top and bottom of a day. Therefore, * if you used the padding value of 3, the number of pixels between any * two days would be 6. * * @param boxPaddingY Number of pixels applied to top and bottom of a day */ public void setBoxPaddingY(int boxPaddingY) { int oldBoxPadding = getBoxPaddingY(); this.boxPaddingY = boxPaddingY; firePropertyChange(BOX_PADDING_Y, oldBoxPadding, getBoxPaddingY()); }
private Border getTitleBorder() { if (monthView.isTraversable()) { IconBorder up = new IconBorder(monthUpImage, SwingConstants.EAST, monthView.getBoxPaddingX()); IconBorder down = new IconBorder(monthDownImage, SwingConstants.WEST, monthView.getBoxPaddingX()); Border compound = BorderFactory.createCompoundBorder(up, down); Border empty = BorderFactory .createEmptyBorder(2 * monthView.getBoxPaddingY(), 0, 2 * monthView.getBoxPaddingY(), 0); return BorderFactory.createCompoundBorder(compound, empty); } return BorderFactory.createEmptyBorder(monthView.getBoxPaddingY(), monthView.getBoxPaddingX(), monthView.getBoxPaddingY(), monthView.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()); }
/** * @return */ private Border getTitleBorder() { if (getComponent().isTraversable()) { Icon downIcon = UIManager.getIcon("JXMonthView.monthDownFileName"); Icon upIcon = UIManager.getIcon("JXMonthView.monthUpFileName"); // fix for #1028-swingx: title border whacky for boxpadding 0 // in fact there had been a deeper issue - without using the arrowPadding here // the hit-detection of the buttons is slightly off target IconBorder up = new IconBorder(upIcon, SwingConstants.EAST, arrowPaddingX); IconBorder down = new IconBorder(downIcon, SwingConstants.WEST, arrowPaddingX); Border compound = BorderFactory.createCompoundBorder(up, down); Border empty = BorderFactory.createEmptyBorder(2* arrowPaddingY, 0, 2*arrowPaddingY, 0); return BorderFactory.createCompoundBorder(compound, empty); } return BorderFactory.createEmptyBorder(getComponent().getBoxPaddingY(), getComponent().getBoxPaddingX(), getComponent().getBoxPaddingY(), getComponent().getBoxPaddingX()); }
/** * @return */ private Border getTitleBorder() { if (getComponent().isTraversable()) { Icon downIcon = UIManager.getIcon("JXMonthView.monthDownFileName"); Icon upIcon = UIManager.getIcon("JXMonthView.monthUpFileName"); // fix for #1028-swingx: title border whacky for boxpadding 0 // in fact there had been a deeper issue - without using the arrowPadding here // the hit-detection of the buttons is slightly off target IconBorder up = new IconBorder(upIcon, SwingConstants.EAST, arrowPaddingX); IconBorder down = new IconBorder(downIcon, SwingConstants.WEST, arrowPaddingX); Border compound = BorderFactory.createCompoundBorder(up, down); Border empty = BorderFactory.createEmptyBorder(2* arrowPaddingY, 0, 2*arrowPaddingY, 0); return BorderFactory.createCompoundBorder(compound, 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()); }
/** * @return */ private Border getTitleBorder() { if (getComponent().isTraversable()) { Icon downIcon = UIManager.getIcon("JXMonthView.monthDownFileName"); Icon upIcon = UIManager.getIcon("JXMonthView.monthUpFileName"); // fix for #1028-swingx: title border whacky for boxpadding 0 // in fact there had been a deeper issue - without using the arrowPadding here // the hit-detection of the buttons is slightly off target IconBorder up = new IconBorder(upIcon, SwingConstants.EAST, arrowPaddingX); IconBorder down = new IconBorder(downIcon, SwingConstants.WEST, arrowPaddingX); Border compound = BorderFactory.createCompoundBorder(up, down); Border empty = BorderFactory.createEmptyBorder(2* arrowPaddingY, 0, 2*arrowPaddingY, 0); return BorderFactory.createCompoundBorder(compound, empty); } return BorderFactory.createEmptyBorder(getComponent().getBoxPaddingY(), getComponent().getBoxPaddingX(), getComponent().getBoxPaddingY(), getComponent().getBoxPaddingX()); }
/** * @return */ private Border getTitleBorder() { if (getComponent().isTraversable()) { Icon downIcon = UIManager.getIcon("JXMonthView.monthDownFileName"); Icon upIcon = UIManager.getIcon("JXMonthView.monthUpFileName"); // fix for #1028-swingx: title border whacky for boxpadding 0 // in fact there had been a deeper issue - without using the arrowPadding here // the hit-detection of the buttons is slightly off target IconBorder up = new IconBorder(upIcon, SwingConstants.EAST, arrowPaddingX); IconBorder down = new IconBorder(downIcon, SwingConstants.WEST, arrowPaddingX); Border compound = BorderFactory.createCompoundBorder(up, down); Border empty = BorderFactory.createEmptyBorder(2* arrowPaddingY, 0, 2*arrowPaddingY, 0); return BorderFactory.createCompoundBorder(compound, empty); } return BorderFactory.createEmptyBorder(getComponent().getBoxPaddingY(), getComponent().getBoxPaddingX(), getComponent().getBoxPaddingY(), getComponent().getBoxPaddingX()); }
/** * @return */ private Border getTitleBorder() { if (getComponent().isTraversable()) { Icon downIcon = UIManager.getIcon("JXMonthView.monthDownFileName"); Icon upIcon = UIManager.getIcon("JXMonthView.monthUpFileName"); // fix for #1028-swingx: title border whacky for boxpadding 0 // in fact there had been a deeper issue - without using the arrowPadding here // the hit-detection of the buttons is slightly off target IconBorder up = new IconBorder(upIcon, SwingConstants.EAST, arrowPaddingX); IconBorder down = new IconBorder(downIcon, SwingConstants.WEST, arrowPaddingX); Border compound = BorderFactory.createCompoundBorder(up, down); Border empty = BorderFactory.createEmptyBorder(2* arrowPaddingY, 0, 2*arrowPaddingY, 0); return BorderFactory.createCompoundBorder(compound, empty); } return BorderFactory.createEmptyBorder(getComponent().getBoxPaddingY(), getComponent().getBoxPaddingX(), getComponent().getBoxPaddingY(), getComponent().getBoxPaddingX()); }
fullBoxHeight = maxBoxHeight; int boxHeight = maxBoxHeight - 2 * monthView.getBoxPaddingY(); fullMonthBoxHeight = Math.max(boxHeight, maxMonthHeight) ;
fullBoxHeight = maxBoxHeight; int boxHeight = maxBoxHeight - 2 * monthView.getBoxPaddingY(); fullMonthBoxHeight = Math.max(boxHeight, maxMonthHeight) ;
fullBoxHeight = maxBoxHeight; int boxHeight = maxBoxHeight - 2 * monthView.getBoxPaddingY(); fullMonthBoxHeight = Math.max(boxHeight, maxMonthHeight) ;
fullBoxHeight = maxBoxHeight; int boxHeight = maxBoxHeight - 2 * monthView.getBoxPaddingY(); fullMonthBoxHeight = Math.max(boxHeight, maxMonthHeight) ;