001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common
008: * Development and Distribution License("CDDL") (collectively, the
009: * "License"). You may not use this file except in compliance with the
010: * License. You can obtain a copy of the License at
011: * http://www.netbeans.org/cddl-gplv2.html
012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013: * specific language governing permissions and limitations under the
014: * License. When distributing the software, include this License Header
015: * Notice in each file and include the License file at
016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
017: * particular file as subject to the "Classpath" exception as provided
018: * by Sun in the GPL Version 2 section of the License file that
019: * accompanied this code. If applicable, add the following below the
020: * License Header, with the fields enclosed by brackets [] replaced by
021: * your own identifying information:
022: * "Portions Copyrighted [year] [name of copyright owner]"
023: *
024: * Contributor(s):
025: *
026: * The Original Software is NetBeans. The Initial Developer of the Original
027: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
028: * Microsystems, Inc. All Rights Reserved.
029: *
030: * If you wish your version of this file to be governed by only the CDDL
031: * or only the GPL Version 2, indicate your decision by adding
032: * "[Contributor] elects to include this software in this distribution
033: * under the [CDDL or GPL Version 2] license." If you do not indicate a
034: * single choice of license, a recipient has the option to distribute
035: * your version of this file under either the CDDL, the GPL Version 2 or
036: * to extend the choice of license to its licensees as provided above.
037: * However, if you add GPL Version 2 code and therefore, elected the GPL
038: * Version 2 license, then the option applies only if the new code is
039: * made subject to such option by the copyright holder.
040: */
041: /*
042: * NSIcomProjectCategoryCustomizer.java
043: *
044: * Created on January 21, 2007, 6:27 PM
045: */
046:
047: package org.netbeans.modules.j2me.cdc.project.nsicom;
048:
049: import java.awt.Color;
050: import java.beans.PropertyChangeEvent;
051: import java.beans.PropertyChangeListener;
052: import javax.swing.JPanel;
053: import javax.swing.UIManager;
054: import org.netbeans.api.mobility.project.ui.customizer.ProjectProperties;
055: import org.netbeans.mobility.activesync.ActiveSyncOps;
056: import org.netbeans.mobility.activesync.DeviceConnectedListener;
057: import org.netbeans.spi.mobility.project.ui.customizer.CustomizerPanel;
058: import org.netbeans.spi.mobility.project.ui.customizer.VisualPropertyGroup;
059: import org.netbeans.spi.mobility.project.ui.customizer.support.VisualPropertySupport;
060: import org.openide.DialogDescriptor;
061: import org.openide.DialogDisplayer;
062: import org.openide.NotifyDescriptor;
063:
064: import org.netbeans.modules.j2me.cdc.project.nsicom.NSIcomPropertiesDescriptor.*;
065: import org.openide.util.NbBundle;
066:
067: /**
068: *
069: * @author suchys
070: */
071: public class NSIcomProjectCategoryCustomizer extends JPanel implements
072: CustomizerPanel, VisualPropertyGroup {
073:
074: private static String[] PROPERTY_NAMES = new String[] {
075: NSIcomPropertiesDescriptor.PROP_MONITOR_HOST,
076: NSIcomPropertiesDescriptor.PROP_VERBOSE,
077: NSIcomPropertiesDescriptor.PROP_RUN_REMOTE,
078: NSIcomPropertiesDescriptor.PROP_REMOTE_VM,
079: NSIcomPropertiesDescriptor.PROP_REMOTE_APP };
080:
081: private VisualPropertySupport vps;
082:
083: private ConnectionListener listener = new ConnectionListener();
084: private Color nbErrorForeground;
085:
086: /** Creates new form NSIcomProjectCategoryCustomizer */
087: public NSIcomProjectCategoryCustomizer() {
088: initComponents();
089:
090: nbErrorForeground = UIManager.getColor("nb.errorForeground"); //NOI18N
091: if (nbErrorForeground == null) {
092: //nbErrorForeground = new Color(89, 79, 191); // RGB suggested by Bruce in #28466
093: nbErrorForeground = new Color(255, 0, 0); // RGB suggested by jdinga in #65358
094: }
095: noteLabel.setForeground(nbErrorForeground);
096: //todo
097: //after first open, the values will updated. I have no other way to do it.
098: // if (evaluator.getProperty(PROP_REMOTE_VM) == null){
099: // remoteVMLocation.setText("\\Windows\\creme\\bin\\CrEme.exe"); //NOI18N
100: // }
101: // if (evaluator.getProperty(PROP_REMOTE_APP) == null){
102: // String appName = evaluator.getProperty("application.name"); //NOI18N
103: // applicationLocation.setText("\\My Documents\\NetBeans Applications\\" + appName); //NOI18N
104: // }
105: }
106:
107: /** This method is called from within the constructor to
108: * initialize the form.
109: * WARNING: Do NOT modify this code. The content of this method is
110: * always regenerated by the Form Editor.
111: */
112: // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
113: private void initComponents() {
114: jLabel1 = new javax.swing.JLabel();
115: monitorHost = new javax.swing.JTextField();
116: verboseCheckBox = new javax.swing.JCheckBox();
117: jSeparator1 = new javax.swing.JSeparator();
118: jLabel2 = new javax.swing.JLabel();
119: applicationLocationLabel = new javax.swing.JLabel();
120: remoteVMLocation = new javax.swing.JTextField();
121: applicationLocation = new javax.swing.JTextField();
122: browseRemoteVM = new javax.swing.JButton();
123: browseRemoteApp = new javax.swing.JButton();
124: jSeparator2 = new javax.swing.JSeparator();
125: noteLabel = new javax.swing.JLabel();
126: remoteVMCheckBox = new javax.swing.JCheckBox();
127: jCheckBox1 = new javax.swing.JCheckBox();
128:
129: jLabel1.setLabelFor(monitorHost);
130: org.openide.awt.Mnemonics.setLocalizedText(jLabel1,
131: org.openide.util.NbBundle.getBundle(
132: NSIcomProjectCategoryCustomizer.class)
133: .getString("LBL_Host_ip"));
134: jLabel1.getAccessibleContext().setAccessibleName(
135: org.openide.util.NbBundle.getBundle(
136: NSIcomProjectCategoryCustomizer.class)
137: .getString("ACSN_Host_ip"));
138: jLabel1.getAccessibleContext().setAccessibleDescription(
139: org.openide.util.NbBundle.getBundle(
140: NSIcomProjectCategoryCustomizer.class)
141: .getString("ACSD_Host_ip"));
142:
143: org.openide.awt.Mnemonics.setLocalizedText(verboseCheckBox,
144: org.openide.util.NbBundle.getBundle(
145: NSIcomProjectCategoryCustomizer.class)
146: .getString("LBL_VM_verbose"));
147: verboseCheckBox.setBorder(javax.swing.BorderFactory
148: .createEmptyBorder(0, 0, 0, 0));
149: verboseCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0));
150: verboseCheckBox.getAccessibleContext().setAccessibleName(
151: org.openide.util.NbBundle.getBundle(
152: NSIcomProjectCategoryCustomizer.class)
153: .getString("ACSN_VM_verbose"));
154: verboseCheckBox.getAccessibleContext()
155: .setAccessibleDescription(
156: org.openide.util.NbBundle.getBundle(
157: NSIcomProjectCategoryCustomizer.class)
158: .getString("ACSD_VM_verbose"));
159:
160: jLabel2.setLabelFor(remoteVMLocation);
161: org.openide.awt.Mnemonics.setLocalizedText(jLabel2,
162: org.openide.util.NbBundle.getBundle(
163: NSIcomProjectCategoryCustomizer.class)
164: .getString("LBL_RemoteVMLocation"));
165: jLabel2.getAccessibleContext().setAccessibleName(
166: org.openide.util.NbBundle.getBundle(
167: NSIcomProjectCategoryCustomizer.class)
168: .getString("ACSN_RemoteVMLocation"));
169: jLabel2.getAccessibleContext().setAccessibleDescription(
170: org.openide.util.NbBundle.getBundle(
171: NSIcomProjectCategoryCustomizer.class)
172: .getString("ACSD_RemoteVMLocation"));
173:
174: applicationLocationLabel.setLabelFor(applicationLocation);
175: org.openide.awt.Mnemonics.setLocalizedText(
176: applicationLocationLabel, org.openide.util.NbBundle
177: .getBundle(
178: NSIcomProjectCategoryCustomizer.class)
179: .getString("LBL_RemoteLocation"));
180: applicationLocationLabel.getAccessibleContext()
181: .setAccessibleName(
182: org.openide.util.NbBundle.getBundle(
183: NSIcomProjectCategoryCustomizer.class)
184: .getString("ACSN_RemoteLocation"));
185: applicationLocationLabel.getAccessibleContext()
186: .setAccessibleDescription(
187: org.openide.util.NbBundle.getBundle(
188: NSIcomProjectCategoryCustomizer.class)
189: .getString("ACSD_RemoteLocation"));
190:
191: org.openide.awt.Mnemonics.setLocalizedText(browseRemoteVM,
192: org.openide.util.NbBundle.getBundle(
193: NSIcomProjectCategoryCustomizer.class)
194: .getString("LBL_BrowseVM"));
195: browseRemoteVM.setEnabled(false);
196: browseRemoteVM
197: .addActionListener(new java.awt.event.ActionListener() {
198: public void actionPerformed(
199: java.awt.event.ActionEvent evt) {
200: browseRemoteVMActionPerformed(evt);
201: }
202: });
203:
204: browseRemoteVM.getAccessibleContext().setAccessibleName(
205: org.openide.util.NbBundle.getBundle(
206: NSIcomProjectCategoryCustomizer.class)
207: .getString("ACSN_BrowseVM"));
208: browseRemoteVM.getAccessibleContext().setAccessibleDescription(
209: org.openide.util.NbBundle.getBundle(
210: NSIcomProjectCategoryCustomizer.class)
211: .getString("ACSD_BrowseVM"));
212:
213: org.openide.awt.Mnemonics.setLocalizedText(browseRemoteApp,
214: org.openide.util.NbBundle.getBundle(
215: NSIcomProjectCategoryCustomizer.class)
216: .getString("LBL_BrowseAppFolder"));
217: browseRemoteApp.setEnabled(false);
218: browseRemoteApp
219: .addActionListener(new java.awt.event.ActionListener() {
220: public void actionPerformed(
221: java.awt.event.ActionEvent evt) {
222: browseRemoteAppActionPerformed(evt);
223: }
224: });
225:
226: browseRemoteApp.getAccessibleContext().setAccessibleName(
227: org.openide.util.NbBundle.getBundle(
228: NSIcomProjectCategoryCustomizer.class)
229: .getString("ACSN_BrowseAppFolder"));
230: browseRemoteApp.getAccessibleContext()
231: .setAccessibleDescription(
232: org.openide.util.NbBundle.getBundle(
233: NSIcomProjectCategoryCustomizer.class)
234: .getString("ACSD_BrowseAppFolder"));
235:
236: noteLabel.setText(" ");
237:
238: org.openide.awt.Mnemonics.setLocalizedText(remoteVMCheckBox,
239: org.openide.util.NbBundle.getBundle(
240: NSIcomProjectCategoryCustomizer.class)
241: .getString("LBL_RunRemote"));
242: remoteVMCheckBox.setBorder(javax.swing.BorderFactory
243: .createEmptyBorder(0, 0, 0, 0));
244: remoteVMCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0));
245: remoteVMCheckBox.getAccessibleContext().setAccessibleName(
246: org.openide.util.NbBundle.getBundle(
247: NSIcomProjectCategoryCustomizer.class)
248: .getString("ACSN_RunRemote"));
249: remoteVMCheckBox.getAccessibleContext()
250: .setAccessibleDescription(
251: org.openide.util.NbBundle.getBundle(
252: NSIcomProjectCategoryCustomizer.class)
253: .getString("ACSD_RunRemote"));
254:
255: org.openide.awt.Mnemonics.setLocalizedText(jCheckBox1, NbBundle
256: .getMessage(NSIcomProjectCategoryCustomizer.class,
257: "LBL_UseDefault"));
258: jCheckBox1.setBorder(javax.swing.BorderFactory
259: .createEmptyBorder(0, 0, 0, 0));
260: jCheckBox1.setMargin(new java.awt.Insets(0, 0, 0, 0));
261:
262: org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(
263: this );
264: this .setLayout(layout);
265: layout
266: .setHorizontalGroup(layout
267: .createParallelGroup(
268: org.jdesktop.layout.GroupLayout.LEADING)
269: .add(
270: layout
271: .createSequentialGroup()
272: .addContainerGap()
273: .add(
274: layout
275: .createParallelGroup(
276: org.jdesktop.layout.GroupLayout.LEADING)
277: .add(
278: jSeparator1,
279: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
280: 448,
281: Short.MAX_VALUE)
282: .add(
283: jSeparator2,
284: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
285: 448,
286: Short.MAX_VALUE)
287: .add(
288: layout
289: .createSequentialGroup()
290: .addPreferredGap(
291: org.jdesktop.layout.LayoutStyle.RELATED)
292: .add(
293: jLabel1)
294: .addPreferredGap(
295: org.jdesktop.layout.LayoutStyle.RELATED)
296: .add(
297: monitorHost,
298: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
299: 312,
300: Short.MAX_VALUE))
301: .add(
302: org.jdesktop.layout.GroupLayout.TRAILING,
303: layout
304: .createSequentialGroup()
305: .add(
306: layout
307: .createParallelGroup(
308: org.jdesktop.layout.GroupLayout.TRAILING)
309: .add(
310: org.jdesktop.layout.GroupLayout.LEADING,
311: noteLabel,
312: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
313: 363,
314: Short.MAX_VALUE)
315: .add(
316: org.jdesktop.layout.GroupLayout.LEADING,
317: jCheckBox1)
318: .add(
319: org.jdesktop.layout.GroupLayout.LEADING,
320: remoteVMCheckBox)
321: .add(
322: org.jdesktop.layout.GroupLayout.LEADING,
323: layout
324: .createSequentialGroup()
325: .add(
326: layout
327: .createParallelGroup(
328: org.jdesktop.layout.GroupLayout.LEADING)
329: .add(
330: jLabel2)
331: .add(
332: applicationLocationLabel))
333: .addPreferredGap(
334: org.jdesktop.layout.LayoutStyle.RELATED)
335: .add(
336: layout
337: .createParallelGroup(
338: org.jdesktop.layout.GroupLayout.LEADING)
339: .add(
340: applicationLocation,
341: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
342: 258,
343: Short.MAX_VALUE)
344: .add(
345: remoteVMLocation,
346: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
347: 258,
348: Short.MAX_VALUE))))
349: .addPreferredGap(
350: org.jdesktop.layout.LayoutStyle.RELATED)
351: .add(
352: layout
353: .createParallelGroup(
354: org.jdesktop.layout.GroupLayout.LEADING)
355: .add(
356: browseRemoteVM)
357: .add(
358: browseRemoteApp)))
359: .add(
360: verboseCheckBox))
361: .addContainerGap()));
362: layout
363: .setVerticalGroup(layout
364: .createParallelGroup(
365: org.jdesktop.layout.GroupLayout.LEADING)
366: .add(
367: layout
368: .createSequentialGroup()
369: .addContainerGap()
370: .add(jCheckBox1)
371: .addPreferredGap(
372: org.jdesktop.layout.LayoutStyle.RELATED)
373: .add(remoteVMCheckBox)
374: .addPreferredGap(
375: org.jdesktop.layout.LayoutStyle.RELATED)
376: .add(
377: layout
378: .createParallelGroup(
379: org.jdesktop.layout.GroupLayout.BASELINE)
380: .add(jLabel2)
381: .add(
382: remoteVMLocation,
383: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
384: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
385: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
386: .add(
387: browseRemoteVM))
388: .add(9, 9, 9)
389: .add(
390: layout
391: .createParallelGroup(
392: org.jdesktop.layout.GroupLayout.BASELINE)
393: .add(
394: applicationLocationLabel)
395: .add(
396: browseRemoteApp)
397: .add(
398: applicationLocation,
399: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
400: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
401: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
402: .addPreferredGap(
403: org.jdesktop.layout.LayoutStyle.RELATED)
404: .add(noteLabel)
405: .addPreferredGap(
406: org.jdesktop.layout.LayoutStyle.RELATED)
407: .add(
408: jSeparator2,
409: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
410: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
411: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
412: .addPreferredGap(
413: org.jdesktop.layout.LayoutStyle.RELATED)
414: .add(
415: layout
416: .createParallelGroup(
417: org.jdesktop.layout.GroupLayout.BASELINE)
418: .add(
419: monitorHost,
420: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
421: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
422: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
423: .add(jLabel1))
424: .add(9, 9, 9)
425: .add(
426: jSeparator1,
427: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
428: org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
429: org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
430: .addPreferredGap(
431: org.jdesktop.layout.LayoutStyle.RELATED)
432: .add(verboseCheckBox)
433: .addContainerGap(102,
434: Short.MAX_VALUE)));
435: }// </editor-fold>//GEN-END:initComponents
436:
437: private void browseRemoteAppActionPerformed(
438: java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseRemoteAppActionPerformed
439: RemoteFilesystemChooser rfc = new RemoteFilesystemChooser(
440: applicationLocation.getText(), true);
441: final DialogDescriptor dd = new DialogDescriptor(rfc,
442: org.openide.util.NbBundle.getBundle(
443: NSIcomProjectCategoryCustomizer.class)
444: .getString("TITLE_BrowseRemoteFolder"));
445: dd.setValid(false);
446: rfc.addPropertyChangeListener(new PropertyChangeListener() {
447: public void propertyChange(PropertyChangeEvent evt) {
448: if (NotifyDescriptor.PROP_VALID.equals(evt
449: .getPropertyName())) {
450: boolean valid = (Boolean) evt.getNewValue();
451: dd.setValid(valid);
452: }
453: }
454: });
455: DialogDisplayer.getDefault().createDialog(dd).setVisible(true);
456: if (NotifyDescriptor.OK_OPTION == dd.getValue()) {
457: applicationLocation.setText(rfc.getSelectedFile());
458: }
459:
460: }//GEN-LAST:event_browseRemoteAppActionPerformed
461:
462: private void browseRemoteVMActionPerformed(
463: java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseRemoteVMActionPerformed
464: RemoteFilesystemChooser rfc = new RemoteFilesystemChooser(
465: remoteVMLocation.getText(), false);
466: final DialogDescriptor dd = new DialogDescriptor(rfc,
467: org.openide.util.NbBundle.getBundle(
468: NSIcomProjectCategoryCustomizer.class)
469: .getString("TITLE_BrowseRemoteVM"));
470: dd.setValid(false);
471: rfc.addPropertyChangeListener(new PropertyChangeListener() {
472: public void propertyChange(PropertyChangeEvent evt) {
473: if (NotifyDescriptor.PROP_VALID.equals(evt
474: .getPropertyName())) {
475: boolean valid = (Boolean) evt.getNewValue();
476: dd.setValid(valid);
477: }
478: }
479: });
480: DialogDisplayer.getDefault().createDialog(dd).setVisible(true);
481: if (NotifyDescriptor.OK_OPTION == dd.getValue()) {
482: remoteVMLocation.setText(rfc.getSelectedFile());
483: }
484:
485: }//GEN-LAST:event_browseRemoteVMActionPerformed
486:
487: // Variables declaration - do not modify//GEN-BEGIN:variables
488: private javax.swing.JTextField applicationLocation;
489: private javax.swing.JLabel applicationLocationLabel;
490: private javax.swing.JButton browseRemoteApp;
491: private javax.swing.JButton browseRemoteVM;
492: private javax.swing.JCheckBox jCheckBox1;
493: private javax.swing.JLabel jLabel1;
494: private javax.swing.JLabel jLabel2;
495: private javax.swing.JSeparator jSeparator1;
496: private javax.swing.JSeparator jSeparator2;
497: private javax.swing.JTextField monitorHost;
498: private javax.swing.JLabel noteLabel;
499: private javax.swing.JCheckBox remoteVMCheckBox;
500: private javax.swing.JTextField remoteVMLocation;
501: private javax.swing.JCheckBox verboseCheckBox;
502:
503: // End of variables declaration//GEN-END:variables
504:
505: public void addNotify() {
506: super .addNotify();
507: try {
508: if (!ActiveSyncOps.getDefault().isAvailable()) {
509: noteLabel.setText(org.openide.util.NbBundle.getBundle(
510: NSIcomProjectCategoryCustomizer.class)
511: .getString("ERR_ActiveSyncError"));//NOI18N
512: browseRemoteApp.setEnabled(false);
513: browseRemoteVM.setEnabled(false);
514: } else {
515: if (!ActiveSyncOps.getDefault().isDeviceConnected()) {
516: noteLabel
517: .setText(org.openide.util.NbBundle
518: .getBundle(
519: NSIcomProjectCategoryCustomizer.class)
520: .getString(
521: "ERR_ActiveSyncDeviceDisconnected"));//NOI18N
522: browseRemoteApp.setEnabled(false);
523: browseRemoteVM.setEnabled(false);
524: } else {
525: browseRemoteApp.setEnabled(true);
526: browseRemoteVM.setEnabled(true);
527: }
528: }
529: } catch (Exception e) {
530: noteLabel.setText(org.openide.util.NbBundle.getBundle(
531: NSIcomProjectCategoryCustomizer.class).getString(
532: "ERR_ActiveSyncError"));//NOI18N
533: browseRemoteApp.setEnabled(false);
534: browseRemoteVM.setEnabled(false);
535: }
536:
537: try {
538: ActiveSyncOps.getDefault().addConnectionListener(listener);
539: } catch (Exception ex) {
540: noteLabel.setText(org.openide.util.NbBundle.getBundle(
541: NSIcomProjectCategoryCustomizer.class).getString(
542: "ERR_ActiveSyncError"));//NOI18N
543: }
544: }
545:
546: public void removeNotify() {
547: try {
548: ActiveSyncOps.getDefault().removeConnectionListener(
549: listener);
550: } catch (Exception ex) {
551: //ignore
552: }
553: super .removeNotify();
554: }
555:
556: private class ConnectionListener implements DeviceConnectedListener {
557: public void onDeviceConnected(boolean connected) {
558: browseRemoteApp.setEnabled(connected);
559: browseRemoteVM.setEnabled(connected);
560: if (connected) {
561: noteLabel.setText(" "); //NOI18N
562: } else {
563: noteLabel.setText(org.openide.util.NbBundle.getBundle(
564: NSIcomProjectCategoryCustomizer.class)
565: .getString("ERR_ActiveSyncDeviceDisconnected"));//NOI18N
566: }
567: }
568: }
569:
570: public void initValues(ProjectProperties props, String configuration) {
571: vps = VisualPropertySupport.getDefault(props);
572: vps.register(jCheckBox1, configuration, this );
573: }
574:
575: public void initGroupValues(boolean useDefault) {
576: vps.register(applicationLocation,
577: NSIcomPropertiesDescriptor.PROP_REMOTE_APP, useDefault);
578: vps.register(remoteVMLocation,
579: NSIcomPropertiesDescriptor.PROP_REMOTE_VM, useDefault);
580: vps.register(monitorHost,
581: NSIcomPropertiesDescriptor.PROP_MONITOR_HOST,
582: useDefault);
583: vps.register(remoteVMCheckBox,
584: NSIcomPropertiesDescriptor.PROP_RUN_REMOTE, useDefault);
585: vps.register(verboseCheckBox,
586: NSIcomPropertiesDescriptor.PROP_VERBOSE, useDefault);
587:
588: remoteVMCheckBox.setEnabled(!useDefault);
589: remoteVMLocation.setEnabled(!useDefault);
590: monitorHost.setEnabled(!useDefault);
591: applicationLocation.setEnabled(!useDefault);
592: verboseCheckBox.setEnabled(!useDefault);
593: browseRemoteApp.setEnabled(!useDefault);
594: browseRemoteVM.setEnabled(!useDefault);
595: }
596:
597: public String[] getGroupPropertyNames() {
598: return PROPERTY_NAMES;
599: }
600:
601: }
|