/** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ private void initComponents() {//GEN-BEGIN:initComponents namePanel = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); newObjectName = new javax.swing.JTextField(); dataFolderPanel = dataFolderPanel = new PropertyPanel (locationFolderModel, PropertyPanel.PREF_CUSTOM_EDITOR); setLayout(new java.awt.BorderLayout()); namePanel.setLayout(new java.awt.BorderLayout(12, 0)); jLabel1.setDisplayedMnemonic(java.util.ResourceBundle.getBundle("org/openide/loaders/Bundle").getString("CTL_NewObjectName_Mnemonic").charAt(0)); jLabel1.setLabelFor(newObjectName); jLabel1.setText(java.util.ResourceBundle.getBundle("org/openide/loaders/Bundle").getString("CTL_NewObjectName")); namePanel.add(jLabel1, java.awt.BorderLayout.WEST); newObjectName.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { TemplateWizard2.this.newObjectNameFocusGained(evt); } }); namePanel.add(newObjectName, java.awt.BorderLayout.CENTER); add(namePanel, java.awt.BorderLayout.NORTH); add(dataFolderPanel, java.awt.BorderLayout.CENTER); }//GEN-END:initComponents
private PropertyPanel getEditor(Property<?> p, Node n) { int prefs = PropertyPanel.PREF_TABLEUI; if (editor == null) { editor = new PropertyPanel(p, prefs); editor.putClientProperty("flat", Boolean.TRUE); //NOI18N editor.putClientProperty("beanBridgeIdentifier", this); //NOI18N //Intentionally set the property again so it will look up the //bean bridge editor.setProperty(p); return editor; } editor.setProperty(p); //Okay, the property panel has already grabbed the beans, clear //them so no references are held. return editor; }
PropertyPanel p = new PropertyPanel(prop); p.setPreferences(PropertyPanel.PREF_CUSTOM_EDITOR);
PropertyPanel p = new PropertyPanel(prop); p.setPreferences(PropertyPanel.PREF_CUSTOM_EDITOR);
private PropertyPanel getEditor(Property p, Node n) { int prefs = PropertyPanel.PREF_TABLEUI; TTVEnvBridge bridge = TTVEnvBridge.getInstance(this); //workaround for issue 38132 - use env bridge to pass the //node to propertypanel so it can call PropertyEnv.setBeans() //with it. The sad thing is almost nobody uses PropertyEnv.getBeans(), //but we have to do it for all cases. bridge.setCurrentBeans(new Node[] { n }); if (editor == null) { editor = new PropertyPanel(p, prefs); editor.putClientProperty("flat", Boolean.TRUE); //NOI18N editor.putClientProperty("beanBridgeIdentifier", this); //NOI18N editor.setProperty(p); return editor; } editor.setProperty(p); //Okay, the property panel has already grabbed the beans, clear //them so no references are held. return editor; }
PropertyPanel p = new PropertyPanel(prop); p.setPreferences(PropertyPanel.PREF_CUSTOM_EDITOR);
PropertyPanel panel = new PropertyPanel(p); @SuppressWarnings("deprecation") PropertyEditor ed = panel.getPropertyEditor();
private boolean openCustomEditor(ActionEvent e) { if (getSelectedRowCount() != 1 || getSelectedColumnCount() != 1) { return false; } int row = getSelectedRow(); if (row < 0) return false; int column = getSelectedColumn(); if (column < 0) return false; Object o = getValueAt(row, column); if (!(o instanceof Node.Property)) { return false; } Node.Property p = (Node.Property) o; if (!Boolean.TRUE.equals(p.getValue("suppressCustomEditor"))) { //NOI18N PropertyPanel panel = new PropertyPanel(p); @SuppressWarnings("deprecation") PropertyEditor ed = panel.getPropertyEditor(); if ((ed != null) && ed.supportsCustomEditor()) { Action act = panel.getActionMap().get("invokeCustomEditor"); //NOI18N if (act != null) { act.actionPerformed(null); return true; } } } return false; } }
private PropertyPanel getEditor(Property p, Node n) { int prefs = PropertyPanel.PREF_TABLEUI; TTVEnvBridge bridge = TTVEnvBridge.getInstance(this); //workaround for issue 38132 - use env bridge to pass the //node to propertypanel so it can call PropertyEnv.setBeans() //with it. The sad thing is almost nobody uses PropertyEnv.getBeans(), //but we have to do it for all cases. bridge.setCurrentBeans(new Node[] {n}); if (editor == null) { editor = new PropertyPanel(p, prefs); editor.putClientProperty("flat", Boolean.TRUE); //NOI18N editor.putClientProperty("beanBridgeIdentifier", this); //NOI18N //Intentionally set the property again so it will look up the //bean bridge editor.setProperty(p); return editor; } editor.setProperty(p); //Okay, the property panel has already grabbed the beans, clear //them so no references are held. return editor; }
private PropertyPanel getEditor(Property p, Node n) { int prefs = PropertyPanel.PREF_TABLEUI; TTVEnvBridge bridge = TTVEnvBridge.getInstance(this); //workaround for issue 38132 - use env bridge to pass the //node to propertypanel so it can call PropertyEnv.setBeans() //with it. The sad thing is almost nobody uses PropertyEnv.getBeans(), //but we have to do it for all cases. bridge.setCurrentBeans(new Node[] {n}); if (editor == null) { editor = new PropertyPanel(p, prefs); editor.putClientProperty("flat", Boolean.TRUE); //NOI18N editor.putClientProperty("beanBridgeIdentifier", this); //NOI18N //Intentionally set the property again so it will look up the //bean bridge editor.setProperty(p); return editor; } editor.setProperty(p); //Okay, the property panel has already grabbed the beans, clear //them so no references are held. return editor; }
private PropertyPanel getEditor(Property p, Node n) { int prefs = PropertyPanel.PREF_TABLEUI; TTVEnvBridge bridge = TTVEnvBridge.getInstance(this); //workaround for issue 38132 - use env bridge to pass the //node to propertypanel so it can call PropertyEnv.setBeans() //with it. The sad thing is almost nobody uses PropertyEnv.getBeans(), //but we have to do it for all cases. bridge.setCurrentBeans(new Node[] {n}); if (editor == null) { editor = new PropertyPanel(p, prefs); editor.putClientProperty("flat", Boolean.TRUE); //NOI18N editor.putClientProperty("beanBridgeIdentifier", this); //NOI18N //Intentionally set the property again so it will look up the //bean bridge editor.setProperty(p); return editor; } editor.setProperty(p); //Okay, the property panel has already grabbed the beans, clear //them so no references are held. return editor; }
for (Property property : propertySet.getProperties()) { if(propertyName.equals(property.getName())) { PropertyPanel propertyPanel = new PropertyPanel(property, PropertyPanel.PREF_CUSTOM_EDITOR); propertyEditorExists = true; propertyPanel.setChangeImmediate(false);
PropertyPanel panel = new PropertyPanel(p); @SuppressWarnings("deprecation") PropertyEditor ed = panel.getPropertyEditor();
PropertyPanel panel = new PropertyPanel (p); PropertyEditor ed = panel.getPropertyEditor(); if (ed != null && ed.supportsCustomEditor()) {
PropertyPanel panel = new PropertyPanel (p); PropertyEditor ed = panel.getPropertyEditor(); if (ed != null && ed.supportsCustomEditor()) {