本文整理了Java中javax.swing.JComponent.putClientProperty()
方法的一些代码示例,展示了JComponent.putClientProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JComponent.putClientProperty()
方法的具体详情如下:
包路径:javax.swing.JComponent
类名称:JComponent
方法名:putClientProperty
暂无
代码示例来源:origin: org.netbeans.api/org-openide-util
/** 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
}
代码示例来源:origin: org.netbeans.api/org-openide-util-ui
/** 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
}
代码示例来源:origin: org.netbeans.api/org-openide-awt
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));
}
}
}
代码示例来源:origin: org.netbeans.api/org-openide-awt
/**
* Detach the quick search from the component it was attached to.
*/
public void detach() {
setEnabled(false);
component.putClientProperty(CLIENT_PROPERTY_KEY, null);
}
代码示例来源:origin: ron190/jsql-injection
this.oldBorder = null;
if (this.heavyWeightContainer != null) {
parent.putClientProperty(ShadowPopupFactory.PROP_HORIZONTAL_BACKGROUND, null);
parent.putClientProperty(ShadowPopupFactory.PROP_VERTICAL_BACKGROUND, null);
this.heavyWeightContainer = null;
代码示例来源:origin: org.netbeans.api/org-openide-awt
} else {
QuickSearch qs = new QuickSearch(component, constraints, callback, asynchronous, popupMenu);
component.putClientProperty(CLIENT_PROPERTY_KEY, qs);
return qs;
代码示例来源:origin: camunda/camunda-bpm-platform
protected JToolBar createToolBar() {
JToolBar tb = new JToolBar();
tb.putClientProperty("JToolBar.isRollover", Boolean.TRUE);
JComboBox fontCombo = new JComboBox();
JComboBox fontSizeCombo = new JComboBox();
代码示例来源:origin: stackoverflow.com
comboBox.putClientProperty("JComboBox.isTableCellEditor", Boolean.TRUE);
getContentPane().add(comboBox, BorderLayout.NORTH );
代码示例来源:origin: stackoverflow.com
b.putClientProperty("JComponent.sizeVariant", size);
return b;
代码示例来源:origin: stackoverflow.com
jdpDesktop.putClientProperty("JDesktopPane.dragMode", "outline");
代码示例来源:origin: stackoverflow.com
dialogTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
lsDialog = dialogTable.getSelectionModel();
dialogTable.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
dialogTable.setRowHeight(20);
dialogTable.setRowMargin(2);
代码示例来源:origin: stackoverflow.com
m_tree.putClientProperty("JTree.lineStyle", "Angled");
代码示例来源:origin: camunda/camunda-bpm-platform
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();
}
代码示例来源:origin: JetBrains/jediterm
public static void resetLayout(JComponent c) {
if (c == null) return;
c.putClientProperty(LAYOUT_DONE, null);
c.putClientProperty(STRETCHED_BY_WIDTH, null);
}
代码示例来源:origin: ron190/jsql-injection
parent.putClientProperty(ShadowPopupFactory.PROP_HORIZONTAL_BACKGROUND, hShadowBg);
parent.putClientProperty(ShadowPopupFactory.PROP_VERTICAL_BACKGROUND, vShadowBg);
代码示例来源:origin: freeplane/freeplane
@Override
public void actionPerformed(ActionEvent e) {
JComponent src = (JComponent) e.getSource();
src.putClientProperty(reason, Boolean.TRUE);
SwingUtilities.getWindowAncestor(src).setVisible(false);
}
}
代码示例来源:origin: freeplane/freeplane
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);
}
}
代码示例来源:origin: org.netbeans.api/org-openide-explorer
/**
* 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);
}
代码示例来源:origin: JetBrains/jediterm
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;
}
代码示例来源:origin: org.netbeans.api/org-openide-explorer
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;
}
内容来源于网络,如有侵权,请联系作者删除!