content.putClientProperty(SubstanceSynapse.COLORIZATION_FACTOR, 1.0); content.setBorder(new EmptyBorder(15, 15, 15, 15));
navContainer.putClientProperty(SubstanceSynapse.COLORIZATION_FACTOR, 1.0); container.add(navContainer);
public void putClientProperty(Object key, Object prop) { _contentPane.putClientProperty(key, prop); }
public void putClientProperty(Object key, Object prop) { _contentPane.putClientProperty(key, prop); }
public void cleanup() { // Clean components container.putClientProperty(ToolWindow.class, null); container.removeAll(); // Finalize popupUpdater = null; toolWindow = null; descriptor = null; resourceManager = null; }
JPanel jPanel = new JPanel(); JLabel label=new JLabel("Hi"); jPanel.add(label); jPanel.putClientProperty("hiLabel", label); System.out.println(jPanel.getClientProperty("hiLabel").getClass().getName());
// 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);
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 }
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());
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) { } }
contentsPanel.add(rightPanelPart, BorderLayout.CENTER); contentsPanel.add(iconLabel, BorderLayout.WEST); contentsPanel.putClientProperty(ELFStyle.KEY, ELFStyle.PANEL_DRAW_BG_CUSTOM);
private void init() component.putClientProperty("shadow","1"); component.setSize(0,0); component.setLocation(0,0);
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; } }
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"));
FormLayout layout = createFormLayout(layoutElement); DefaultFormBuilder builder= new DefaultFormBuilder(layout, panel); panel.putClientProperty(SwingXMLBuilder.FORMBUILDER_PROPERTY, builder);
windowPanel.putClientProperty(CLIENT_PROPERTY_DOCK_MODEL, dockModel);
container.setFocusable(false); container.putClientProperty(ToolWindow.class, toolWindow);