/** * Sets the color for the previously not visited link. This value will override the one * set by the "JXHyperlink.unclickedColor" UIManager property and defaults. * * @param color Color for the hyper link if it has not yet been clicked. */ public void setUnclickedColor(Color color) { Color old = getUnclickedColor(); unclickedColor = color; if (!isClicked()) { setForeground(getUnclickedColor()); } firePropertyChange("unclickedColor", old, getUnclickedColor()); }
/** * Sets the color for the previously not visited link. This value will override the one * set by the "JXHyperlink.unclickedColor" UIManager property and defaults. * * @param color Color for the hyper link if it has not yet been clicked. */ public void setUnclickedColor(Color color) { Color old = getUnclickedColor(); unclickedColor = color; if (!isClicked()) { setForeground(getUnclickedColor()); } firePropertyChange("unclickedColor", old, getUnclickedColor()); }
/** * Sets the color for the previously not visited link. This value will override the one * set by the "JXHyperlink.unclickedColor" UIManager property and defaults. * * @param color Color for the hyper link if it has not yet been clicked. */ public void setUnclickedColor(Color color) { Color old = getUnclickedColor(); unclickedColor = color; if (!isClicked()) { setForeground(getUnclickedColor()); } firePropertyChange("unclickedColor", old, getUnclickedColor()); }
/** * Sets the color for the previously not visited link. This value will override the one * set by the "JXHyperlink.unclickedColor" UIManager property and defaults. * * @param color Color for the hyper link if it has not yet been clicked. */ public void setUnclickedColor(Color color) { Color old = getUnclickedColor(); unclickedColor = color; if (!isClicked()) { setForeground(getUnclickedColor()); } firePropertyChange("unclickedColor", old, getUnclickedColor()); }
/** * Sets the color for the previously visited link. This value will override the one * set by the "JXHyperlink.clickedColor" UIManager property and defaults. * * @param color Color for the hyper link if it has already been clicked. */ public void setUnclickedColor(Color color) { Color old = getUnclickedColor(); unclickedColor = color; if (!isClicked()) { setForeground(getUnclickedColor()); } firePropertyChange("unclickedColor", old, getUnclickedColor()); }
private void init() { setForeground(isClicked() ? getClickedColor() : getUnclickedColor()); }
private void init() { setForeground(isClicked() ? getClickedColor() : getUnclickedColor()); }
private void init() { setForeground(isClicked() ? getClickedColor() : getUnclickedColor()); }
private void init() { setForeground(isClicked() ? getClickedColor() : getUnclickedColor()); }
private void init() { setForeground(isClicked() ? getClickedColor() : getUnclickedColor()); }
/** * Sets the clicked property and updates visual state depending on clicked. * This implementation updated the foreground color. * <p> * * NOTE: as with all button's visual properties, this will not update the * backing action's "visited" state. * * @param clicked flag to indicate if the button should be regarded as * having been clicked or not. * @see #isClicked() */ public void setClicked(boolean clicked) { boolean old = isClicked(); hasBeenVisited = clicked; setForeground(isClicked() ? getClickedColor() : getUnclickedColor()); firePropertyChange("clicked", old, isClicked()); }
/** * Sets the clicked property and updates visual state depending on clicked. * This implementation updated the foreground color. * <p> * * NOTE: as with all button's visual properties, this will not update the * backing action's "visited" state. * * @param clicked flag to indicate if the button should be regarded as * having been clicked or not. * @see #isClicked() */ public void setClicked(boolean clicked) { boolean old = isClicked(); hasBeenVisited = clicked; setForeground(isClicked() ? getClickedColor() : getUnclickedColor()); firePropertyChange("clicked", old, isClicked()); }
/** * Sets the clicked property and updates visual state depending on clicked. * This implementation updated the foreground color. * <p> * * NOTE: as with all button's visual properties, this will not update the * backing action's "visited" state. * * @param clicked flag to indicate if the button should be regarded as * having been clicked or not. * @see #isClicked() */ public void setClicked(boolean clicked) { boolean old = isClicked(); hasBeenVisited = clicked; setForeground(isClicked() ? getClickedColor() : getUnclickedColor()); firePropertyChange("clicked", old, isClicked()); }
/** * Sets the clicked property and updates visual state depending on clicked. * This implementation updated the foreground color. * <p> * * NOTE: as with all button's visual properties, this will not update the * backing action's "visited" state. * * @param clicked flag to indicate if the button should be regarded as * having been clicked or not. * @see #isClicked() */ public void setClicked(boolean clicked) { boolean old = isClicked(); hasBeenVisited = clicked; setForeground(isClicked() ? getClickedColor() : getUnclickedColor()); firePropertyChange("clicked", old, isClicked()); }
/** * Sets the clicked property and updates visual state depending on clicked. * This implementation updated the foreground color. * <p> * * NOTE: as with all button's visual properties, this will not update the * backing action's "visited" state. * * @param clicked flag to indicate if the button should be regarded as * having been clicked or not. * @see #isClicked() */ public void setClicked(boolean clicked) { boolean old = isClicked(); hasBeenVisited = clicked; setForeground(isClicked() ? getClickedColor() : getUnclickedColor()); firePropertyChange("clicked", old, isClicked()); }
@Override protected void installDefaults(AbstractButton b) { super.installDefaults(b); JXHyperlink link = (JXHyperlink) b; LookAndFeel.installProperty(b, "opaque", false); if (SwingXUtilities.isUIInstallable(link.getUnclickedColor())) { link.setUnclickedColor(UIManager.getColor("Hyperlink.linkColor")); } if (SwingXUtilities.isUIInstallable(link.getClickedColor())) { link.setClickedColor(UIManager.getColor("Hyperlink.visitedColor")); } b.setBorderPainted(false); b.setRolloverEnabled(true); if (SwingXUtilities.isUIInstallable(b.getBorder())) { b.setBorder(new BorderUIResource(BorderFactory.createEmptyBorder(0, 1, 0, 0))); } dashedRectGapX = UIManager.getInt("ButtonUI.dashedRectGapX"); dashedRectGapY = UIManager.getInt("ButtonUI.dashedRectGapY"); dashedRectGapWidth = UIManager.getInt("ButtonUI.dashedRectGapWidth"); dashedRectGapHeight = UIManager.getInt("ButtonUI.dashedRectGapHeight"); focusColor = UIManager.getColor("ButtonUI.focus"); b.setHorizontalAlignment(SwingConstants.LEADING); }
@Override protected void installDefaults(AbstractButton b) { super.installDefaults(b); JXHyperlink link = (JXHyperlink) b; LookAndFeel.installProperty(b, "opaque", false); if (SwingXUtilities.isUIInstallable(link.getUnclickedColor())) { link.setUnclickedColor(UIManager.getColor("Hyperlink.linkColor")); } if (SwingXUtilities.isUIInstallable(link.getClickedColor())) { link.setClickedColor(UIManager.getColor("Hyperlink.visitedColor")); } b.setBorderPainted(false); b.setRolloverEnabled(true); if (SwingXUtilities.isUIInstallable(b.getBorder())) { b.setBorder(new BorderUIResource(BorderFactory.createEmptyBorder(0, 1, 0, 0))); } dashedRectGapX = UIManager.getInt("ButtonUI.dashedRectGapX"); dashedRectGapY = UIManager.getInt("ButtonUI.dashedRectGapY"); dashedRectGapWidth = UIManager.getInt("ButtonUI.dashedRectGapWidth"); dashedRectGapHeight = UIManager.getInt("ButtonUI.dashedRectGapHeight"); focusColor = UIManager.getColor("ButtonUI.focus"); b.setHorizontalAlignment(SwingConstants.LEADING); }
@Override protected void installDefaults(AbstractButton b) { super.installDefaults(b); JXHyperlink link = (JXHyperlink) b; LookAndFeel.installProperty(b, "opaque", false); if (SwingXUtilities.isUIInstallable(link.getUnclickedColor())) { link.setUnclickedColor(UIManager.getColor("Hyperlink.linkColor")); } if (SwingXUtilities.isUIInstallable(link.getClickedColor())) { link.setClickedColor(UIManager.getColor("Hyperlink.visitedColor")); } b.setBorderPainted(false); b.setRolloverEnabled(true); if (SwingXUtilities.isUIInstallable(b.getBorder())) { b.setBorder(new BorderUIResource(BorderFactory.createEmptyBorder(0, 1, 0, 0))); } dashedRectGapX = UIManager.getInt("ButtonUI.dashedRectGapX"); dashedRectGapY = UIManager.getInt("ButtonUI.dashedRectGapY"); dashedRectGapWidth = UIManager.getInt("ButtonUI.dashedRectGapWidth"); dashedRectGapHeight = UIManager.getInt("ButtonUI.dashedRectGapHeight"); focusColor = UIManager.getColor("ButtonUI.focus"); b.setHorizontalAlignment(SwingConstants.LEADING); }
@Override protected void installDefaults(AbstractButton b) { super.installDefaults(b); JXHyperlink link = (JXHyperlink) b; LookAndFeel.installProperty(b, "opaque", false); if (SwingXUtilities.isUIInstallable(link.getUnclickedColor())) { link.setUnclickedColor(UIManager.getColor("Hyperlink.linkColor")); } if (SwingXUtilities.isUIInstallable(link.getClickedColor())) { link.setClickedColor(UIManager.getColor("Hyperlink.visitedColor")); } b.setBorderPainted(false); b.setRolloverEnabled(true); if (SwingXUtilities.isUIInstallable(b.getBorder())) { b.setBorder(new BorderUIResource(BorderFactory.createEmptyBorder(0, 1, 0, 0))); } dashedRectGapX = UIManager.getInt("ButtonUI.dashedRectGapX"); dashedRectGapY = UIManager.getInt("ButtonUI.dashedRectGapY"); dashedRectGapWidth = UIManager.getInt("ButtonUI.dashedRectGapWidth"); dashedRectGapHeight = UIManager.getInt("ButtonUI.dashedRectGapHeight"); focusColor = UIManager.getColor("ButtonUI.focus"); b.setHorizontalAlignment(SwingConstants.LEADING); }
rendererComponent.getClickedColor() : rendererComponent.getUnclickedColor()); } else {