javax.swing.JPanel.putClientProperty()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(6.9k)|赞(0)|评价(0)|浏览(190)

本文整理了Java中javax.swing.JPanel.putClientProperty()方法的一些代码示例,展示了JPanel.putClientProperty()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JPanel.putClientProperty()方法的具体详情如下:
包路径:javax.swing.JPanel
类名称:JPanel
方法名:putClientProperty

JPanel.putClientProperty介绍

暂无

代码示例

代码示例来源:origin: runelite/runelite

content.putClientProperty(SubstanceSynapse.COLORIZATION_FACTOR, 1.0);
content.setBorder(new EmptyBorder(15, 15, 15, 15));

代码示例来源:origin: runelite/runelite

navContainer.putClientProperty(SubstanceSynapse.COLORIZATION_FACTOR, 1.0);
container.add(navContainer);

代码示例来源:origin: net.sf.squirrel-sql/squirrel-sql

public void putClientProperty(Object key, Object prop)
{
 _contentPane.putClientProperty(key, prop);
}

代码示例来源:origin: realXuJiang/bigtable-sql

public void putClientProperty(Object key, Object prop)
{
 _contentPane.putClientProperty(key, prop);
}

代码示例来源:origin: net.sourceforge.mydoggy/mydoggy-plaf

public void cleanup() {
  // Clean components
  container.putClientProperty(ToolWindow.class, null);
  container.removeAll();
  // Finalize
  popupUpdater = null;
  toolWindow = null;
  descriptor = null;
  resourceManager = null;
}

代码示例来源:origin: stackoverflow.com

JPanel jPanel = new JPanel();
 JLabel label=new JLabel("Hi");
 jPanel.add(label);
 jPanel.putClientProperty("hiLabel", label);
 System.out.println(jPanel.getClientProperty("hiLabel").getClass().getName());

代码示例来源:origin: stackoverflow.com

// Specify the colors
UIDefaults uiDef = new UIDefaults();
uiDef.put("Panel.background", Color.BLUE);

// Use the colors on a specific component
JPanel panel = new JPanel();
panel.putClientProperty("Nimbus.Overrides", uiDef);
SwingUtilities.updateComponentTreeUI(panel);

代码示例来源:origin: stackoverflow.com

public static void setJPanelMenuBar(JPanel parent, JPanel child, JMenuBar menuBar) {
 parent.removeAll();
 parent.setLayout(new BorderLayout());
 JRootPane root = new JRootPane();
 parent.add(root, BorderLayout.CENTER);
 root.setJMenuBar(menuBar);
 root.getContentPane().add(child);
 parent.putClientProperty("root", root);  //if you need later
}

代码示例来源:origin: stackoverflow.com

if (name != null) {
  System.out.println(name + " removed");
  panel.putClientProperty(name, null);
if (name != null) {
  System.out.println(name + " added");
  panel.putClientProperty(name, e.getChild());

代码示例来源:origin: com.jtattoo/JTattoo

protected void installDefaults(JPanel p) {
  super.installDefaults(p);
  p.setFont(AbstractLookAndFeel.getTheme().getControlTextFont());
  
  // We don't want medium weight popups for tool tips, so we try to force heavy weight popups.
  try {
    Field field;
    if (JTattooUtilities.getJavaVersion() < 1.7) {
      Class clazz = Class.forName("javax.swing.PopupFactory");
      field = clazz.getDeclaredField("forceHeavyWeightPopupKey");
    } else { //1.7.0, 1.8.0
      Class clazz = Class.forName("javax.swing.ClientPropertyKey");
      field = clazz.getDeclaredField("PopupFactory_FORCE_HEAVYWEIGHT_POPUP");
    }
    field.setAccessible(true);
    p.putClientProperty(field.get(null), Boolean.TRUE);
  } catch(Exception ex) {
  }        
}

代码示例来源:origin: jsettlers/settlers-remake

contentsPanel.add(rightPanelPart, BorderLayout.CENTER);
contentsPanel.add(iconLabel, BorderLayout.WEST);
contentsPanel.putClientProperty(ELFStyle.KEY, ELFStyle.PANEL_DRAW_BG_CUSTOM);

代码示例来源:origin: org.jclarion/clarion-runtime

private void init()
  component.putClientProperty("shadow","1");
  component.setSize(0,0);
  component.setLocation(0,0);

代码示例来源:origin: org.ihtsdo/wb-api

private void doRun(final I_EncodeBusinessProcess process) {
  I_ConfigAceFrame config;
  try {
    config = (I_ConfigAceFrame) process.getProperty(getProfilePropName());
    JPanel workflowDetailsSheet = config.getWorkflowDetailsSheet();
    Component[] components = workflowDetailsSheet.getComponents();
    for (int i = 0; i < components.length; i++) {
      workflowDetailsSheet.remove(components[i]);
    }
    workflowDetailsSheet.setVisible(false);
    workflowDetailsSheet.putClientProperty(DetailSheetClientProperties.COMPONENT_FOR_FOCUS, null);
  } catch (Exception e) {
    ex = e;
  }
}

代码示例来源:origin: BashSupport/BashSupport

final JPanel panel1 = new JPanel();
panel1.setLayout(new GridLayoutManager(4, 1, new Insets(0, 0, 0, 0), -1, -1));
panel1.putClientProperty("BorderFactoryClass", "com.intellij.ui.IdeBorderFactory$PlainSmallWithIndent");
settingsPane.add(panel1, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
panel1.setBorder(BorderFactory.createTitledBorder("Variables"));
final JPanel panel2 = new JPanel();
panel2.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
panel2.putClientProperty("BorderFactoryClass", "com.intellij.ui.IdeBorderFactory$PlainSmallWithIndent");
settingsPane.add(panel2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));
panel2.setBorder(BorderFactory.createTitledBorder("Language level"));
final JPanel panel3 = new JPanel();
panel3.setLayout(new GridLayoutManager(4, 1, new Insets(0, 0, 0, 0), -1, -1));
panel3.putClientProperty("BorderFactoryClass", "com.intellij.ui.IdeBorderFactory$PlainSmallWithIndent");
settingsPane.add(panel3, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));
panel3.setBorder(BorderFactory.createTitledBorder("Autocompletion"));
final JPanel panel4 = new JPanel();
panel4.setLayout(new GridLayoutManager(6, 1, new Insets(0, 0, 0, 0), -1, -1));
panel4.putClientProperty("BorderFactoryClass", "com.intellij.ui.IdeBorderFactory$PlainSmallWithIndent");
settingsPane.add(panel4, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));
panel4.setBorder(BorderFactory.createTitledBorder("Experimental features - use at your own risk!"));
final JPanel panel5 = new JPanel();
panel5.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));
panel5.putClientProperty("BorderFactoryClass", "com.intellij.ui.IdeBorderFactory$PlainSmallWithIndent");
settingsPane.add(panel5, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));
panel5.setBorder(BorderFactory.createTitledBorder("Validation"));

代码示例来源:origin: net.sf.cuf/cuf-swing

FormLayout         layout = createFormLayout(layoutElement);
DefaultFormBuilder builder= new DefaultFormBuilder(layout, panel);
panel.putClientProperty(SwingXMLBuilder.FORMBUILDER_PROPERTY, builder);

代码示例来源:origin: net.sf.doolin/doolin-gui

windowPanel.putClientProperty(CLIENT_PROPERTY_DOCK_MODEL, dockModel);

代码示例来源:origin: net.sourceforge.mydoggy/mydoggy-plaf

container.setFocusable(false);
container.putClientProperty(ToolWindow.class, toolWindow);

相关文章

JPanel类方法