/** Set the help ID for a component. * @param comp the visual component to associate help to * @param helpID help ID, or <code>null</code> if the help ID should be removed */ public static void setHelpIDString(JComponent comp, String helpID) { err.log(Level.FINE, "setHelpIDString: {0} on {1}", new Object[]{helpID, comp}); comp.putClientProperty("HelpID", helpID); // NOI18N }
/** Set the help ID for a component. * @param comp the visual component to associate help to * @param helpID help ID, or <code>null</code> if the help ID should be removed */ public static void setHelpIDString(JComponent comp, String helpID) { err.log(Level.FINE, "setHelpIDString: {0} on {1}", new Object[]{helpID, comp}); comp.putClientProperty("HelpID", helpID); // NOI18N }
private void handleIconResize() { for (Component comp : overflowToolbar.getComponents()) { boolean smallToolbarIcons = getClientProperty(PROP_PREF_ICON_SIZE) == null; if (smallToolbarIcons) { ((JComponent) comp).putClientProperty(PROP_PREF_ICON_SIZE, null); } else { ((JComponent) comp).putClientProperty(PROP_PREF_ICON_SIZE, Integer.valueOf(24)); } } }
/** * Detach the quick search from the component it was attached to. */ public void detach() { setEnabled(false); component.putClientProperty(CLIENT_PROPERTY_KEY, null); }
this.oldBorder = null; if (this.heavyWeightContainer != null) { parent.putClientProperty(ShadowPopupFactory.PROP_HORIZONTAL_BACKGROUND, null); parent.putClientProperty(ShadowPopupFactory.PROP_VERTICAL_BACKGROUND, null); this.heavyWeightContainer = null;
} else { QuickSearch qs = new QuickSearch(component, constraints, callback, asynchronous, popupMenu); component.putClientProperty(CLIENT_PROPERTY_KEY, qs); return qs;
protected JToolBar createToolBar() { JToolBar tb = new JToolBar(); tb.putClientProperty("JToolBar.isRollover", Boolean.TRUE); JComboBox fontCombo = new JComboBox(); JComboBox fontSizeCombo = new JComboBox();
comboBox.putClientProperty("JComboBox.isTableCellEditor", Boolean.TRUE); getContentPane().add(comboBox, BorderLayout.NORTH );
b.putClientProperty("JComponent.sizeVariant", size); return b;
jdpDesktop.putClientProperty("JDesktopPane.dragMode", "outline");
dialogTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); lsDialog = dialogTable.getSelectionModel(); dialogTable.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE); dialogTable.setRowHeight(20); dialogTable.setRowMargin(2);
m_tree.putClientProperty("JTree.lineStyle", "Angled");
protected void init() { // Put visible lines on the JTree. putClientProperty("JTree.lineStyle", "Angled"); // Configure the Tree with the appropriate Renderers and Editors. CategoryNodeRenderer renderer = new CategoryNodeRenderer(); setEditable(true); setCellRenderer(renderer); CategoryNodeEditor editor = new CategoryNodeEditor(_model); setCellEditor(new CategoryImmediateEditor(this, new CategoryNodeRenderer(), editor)); setShowsRootHandles(true); setToolTipText(""); ensureRootExpansion(); }
public static void resetLayout(JComponent c) { if (c == null) return; c.putClientProperty(LAYOUT_DONE, null); c.putClientProperty(STRETCHED_BY_WIDTH, null); }
parent.putClientProperty(ShadowPopupFactory.PROP_HORIZONTAL_BACKGROUND, hShadowBg); parent.putClientProperty(ShadowPopupFactory.PROP_VERTICAL_BACKGROUND, vShadowBg);
@Override public void actionPerformed(ActionEvent e) { JComponent src = (JComponent) e.getSource(); src.putClientProperty(reason, Boolean.TRUE); SwingUtilities.getWindowAncestor(src).setVisible(false); } }
public void actionPerformed(ActionEvent e) { final JComponent mapViewComponent = getMapViewComponent(); if(mapViewComponent != null) { final Boolean value = Boolean.TRUE.equals(mapViewComponent.getClientProperty(propertyName)); boolean newValue = ! value.booleanValue(); mapViewComponent.putClientProperty(propertyName, newValue); setSelected(newValue); } }
/** * Register a child of a JScrollPane (only JList or JTree supported * for now) which should show helper tooltips. Should be called * from the component's addNotify() method. */ synchronized static void register (JComponent comp) { ViewTooltips vtt = (ViewTooltips) comp.getClientProperty(KEY); assert vtt == null : "There already is " + vtt + " for " + comp; comp.putClientProperty(KEY, vtt = new ViewTooltips()); vtt.attachTo (comp); }
public Rectangle layout(JComponent c, Rectangle bounds) { final Rectangle now = c.getBounds(); if (!bounds.equals(now)) { c.setBounds(bounds); } c.putClientProperty(LAYOUT_DONE, Boolean.TRUE); return bounds; }
private JComponent createTabbedContainer() { JComponent result = TabbedContainerBridge.getDefault().createTabbedContainer(); result.putClientProperty("tc", Boolean.TRUE); configureTabbedContainer(tabbedContainerObjects, tabbedContainerTitles, result); if (selectionListener != null) { TabbedContainerBridge.getDefault().attachSelectionListener(result, selectionListener); } return result; }