@Override protected void configureLabel(JXTaskPane group) { label.applyComponentOrientation(group.getComponentOrientation()); label.setFont(group.getFont()); label.setText(group.getTitle()); label.setIcon(group.getIcon() == null ? new EmptyIcon() : group .getIcon()); } }
/** * Configures label for the group using its title, font, icon and * orientation. * * @param group * Selected group. */ protected void configureLabel(JXTaskPane group) { label.applyComponentOrientation(group.getComponentOrientation()); label.setFont(group.getFont()); label.setText(group.getTitle()); label.setIcon(group.getIcon() == null ? new EmptyIcon() : group .getIcon()); }
/** * Configures label for the group using its title, font, icon and * orientation. * * @param group * Selected group. */ protected void configureLabel(JXTaskPane group) { label.applyComponentOrientation(group.getComponentOrientation()); label.setFont(group.getFont()); label.setText(group.getTitle()); label.setIcon(group.getIcon() == null ? new EmptyIcon() : group .getIcon()); }
/** * Configures label for the group using its title, font, icon and * orientation. * * @param group * Selected group. */ protected void configureLabel(JXTaskPane group) { label.applyComponentOrientation(group.getComponentOrientation()); label.setFont(group.getFont()); label.setText(group.getTitle()); label.setIcon(group.getIcon() == null ? new EmptyIcon() : group .getIcon()); }
/** * Configures label for the group using its title, font, icon and * orientation. * * @param group * Selected group. */ protected void configureLabel(JXTaskPane group) { label.applyComponentOrientation(group.getComponentOrientation()); label.setFont(group.getFont()); label.setText(group.getTitle()); label.setIcon(group.getIcon() == null ? new EmptyIcon() : group .getIcon()); }
/** * Configures label for the group using its title, font, icon and * orientation. * * @param group * Selected group. */ protected void configureLabel(JXTaskPane group) { label.applyComponentOrientation(group.getComponentOrientation()); label.setFont(group.getFont()); label.setText(group.getTitle()); label.setIcon(group.getIcon() == null ? new EmptyIcon() : group .getIcon()); }
/** * <p>Align the icon according to the locale (leading or trailing)</p> * * @param label The label (iconography will change will changes to the label color and font) * @param leading True if the icon comes before the text in the reading direction (LTR and RTL is handled automatically) */ private static void align(JLabel label, boolean leading) { label.applyComponentOrientation(ComponentOrientation.getOrientation(Languages.currentLocale())); if (leading) { // Text trails the icon in LTR label.setHorizontalTextPosition(SwingConstants.TRAILING); } else { label.setHorizontalTextPosition(SwingConstants.LEADING); } }