Border border = new CompoundBorder(textField.getBorder(), new IconBorder(...)); textField.setBorder( border );
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()); } }
/** * @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()); }
/** * @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()); }