use of org.jdesktop.swingx.JXHyperlink in project adempiere by adempiere.
the class StackedBox method addBox.
/**
* Adds a new component to this <code>StackedBox</code>
*
* @param title
* @param component
*/
public void addBox(String title, Component component) {
final JXCollapsiblePane collapsible = new JXCollapsiblePane();
collapsible.getContentPane().setBackground(Color.WHITE);
collapsible.add(component);
collapsible.setBorder(new CompoundBorder(separatorBorder, collapsible.getBorder()));
Action toggleAction = collapsible.getActionMap().get(JXCollapsiblePane.TOGGLE_ACTION);
// use the collapse/expand icons from the JTree UI
toggleAction.putValue(JXCollapsiblePane.COLLAPSE_ICON, UIManager.getIcon("Tree.expandedIcon"));
toggleAction.putValue(JXCollapsiblePane.EXPAND_ICON, UIManager.getIcon("Tree.collapsedIcon"));
JXHyperlink link = new JXHyperlink(toggleAction);
link.setText(title);
link.setFont(link.getFont().deriveFont(Font.BOLD));
link.setOpaque(true);
link.setBackground(getTitleBackgroundColor());
link.setFocusPainted(false);
link.setUnclickedColor(getTitleForegroundColor());
link.setClickedColor(getTitleForegroundColor());
link.setBorder(new CompoundBorder(separatorBorder, BorderFactory.createEmptyBorder(2, 4, 2, 4)));
link.setBorderPainted(true);
add(link);
add(collapsible);
}
use of org.jdesktop.swingx.JXHyperlink in project azure-tools-for-java by Microsoft.
the class AzureCodeSamples method onActionPerformed.
@Override
public boolean onActionPerformed(@NotNull AnActionEvent anActionEvent, @Nullable Operation operation) {
JXHyperlink portalLing = new JXHyperlink();
portalLing.setURI(URI.create("https://azure.microsoft.com/en-us/documentation/samples/?platform=java"));
portalLing.doClick();
return true;
}
Aggregations