|
What this is
Other links
The source code/* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License * Version 1.0 (the "License"). You may not use this file except in * compliance with the License. A copy of the License is available at * http://www.sun.com/ * * The Original Code is NetBeans. The Initial Developer of the Original * Code is Sun Microsystems, Inc. Portions Copyright 1997-2000 Sun * Microsystems, Inc. All Rights Reserved. */ package org.netbeans.modules.javacvs; import java.awt.Image; import java.beans.*; import org.openide.util.HelpCtx; import org.openide.util.NbBundle; //import org.openide.explorer.propertysheet.editors.DirectoryOnlyEditor; import org.openide.filesystems.FileSystem; import org.netbeans.modules.javacvs.editors.RefreshModePropertyEditor; /** Description of the file system. * * @author mkleint */ public class JavaCvsFileSystemBeanInfo extends SimpleBeanInfo { public BeanInfo[] getAdditionalBeanInfo () { try { return new BeanInfo[] { Introspector.getBeanInfo (FileSystem.class) }; } catch (IntrospectionException ie) { org.openide.ErrorManager.getDefault().notify(ie); return null; } } // If you have a visual dialog to customize configuration of the file system: public BeanDescriptor getBeanDescriptor () { BeanDescriptor bd = new BeanDescriptor (JavaCvsFileSystem.class); return bd; } public PropertyDescriptor[] getPropertyDescriptors () { try { // Included only to make it a writable property (it is read-only in FileSystem): PropertyDescriptor readOnly = new PropertyDescriptor ("readOnly", JavaCvsFileSystem.class); //NOI18N readOnly.setDisplayName (NbBundle.getMessage (JavaCvsFileSystemBeanInfo.class, "PROP_readOnly")); //NOI18N readOnly.setShortDescription (NbBundle.getMessage (JavaCvsFileSystemBeanInfo.class, "HINT_readOnly")); //NOI18N // working directory - together with rel mount makes up rootDirectory. PropertyDescriptor workingDir = new PropertyDescriptor ("workingDir", JavaCvsFileSystem.class); //NOI18N workingDir.setDisplayName (NbBundle.getMessage (JavaCvsFileSystemBeanInfo.class, "PROP_workingDir")); //NOI18N workingDir.setShortDescription (NbBundle.getMessage (JavaCvsFileSystemBeanInfo.class, "HINT_workingDir")); //NOI18N // workingDir.setPropertyEditorClass (RootEd.class); // rel mount PropertyDescriptor relMount = new PropertyDescriptor ("relMount", JavaCvsFileSystem.class); //NOI18N relMount.setDisplayName (NbBundle.getMessage (JavaCvsFileSystemBeanInfo.class, "PROP_relMount")); //NOI18N relMount.setShortDescription (NbBundle.getMessage (JavaCvsFileSystemBeanInfo.class, "HINT_relMount")); //NOI18N // work off-line PropertyDescriptor offLine = new PropertyDescriptor ("offLine", JavaCvsFileSystem.class); //NOI18N offLine.setDisplayName (NbBundle.getMessage (JavaCvsFileSystemBeanInfo.class, "PROP_offLine")); //NOI18N offLine.setShortDescription (NbBundle.getMessage (JavaCvsFileSystemBeanInfo.class, "HINT_offLine")); //NOI18N // automatic refresh PropertyDescriptor autoRefresh = new PropertyDescriptor ("autoRefresh", JavaCvsFileSystem.class); //NOI18N autoRefresh.setDisplayName (NbBundle.getMessage (JavaCvsFileSystemBeanInfo.class, "PROP_autoRefresh")); //NOI18N autoRefresh.setShortDescription (NbBundle.getMessage (JavaCvsFileSystemBeanInfo.class, "HINT_autoRefresh")); //NOI18N autoRefresh.setPropertyEditorClass(RefreshModePropertyEditor.class); // autoRefresh.setPropertyEditorClass(); // send/receive zipped /* PropertyDescriptor zippedTransfer = new PropertyDescriptor ("zippedTransfer", JavaCvsFileSystem.class); //NOI18N zippedTransfer.setDisplayName (NbBundle.getMessage (JavaCvsFileSystemBeanInfo.class, "PROP_zippedTransfer")); //NOI18N zippedTransfer.setShortDescription (NbBundle.getMessage (JavaCvsFileSystemBeanInfo.class, "HINT_zippedTransfer")); //NOI18N */ // hide shadow files. /* PropertyDescriptor hideShadowFiles = new PropertyDescriptor ("hideShadowFiles", JavaCvsFileSystem.class); //NOI18N hideShadowFiles.setDisplayName (NbBundle.getMessage (JavaCvsFileSystemBeanInfo.class, "PROP_hideShadowFiles")); //NOI18N hideShadowFiles.setShortDescription (NbBundle.getMessage (JavaCvsFileSystemBeanInfo.class, "HINT_hideShadowFiles")); //NOI18N */ PropertyDescriptor cvsIgnore = new PropertyDescriptor ("cvsIgnoreList", JavaCvsFileSystem.class, "getCvsIgnoreList", null); //NOI18N cvsIgnore.setDisplayName (NbBundle.getMessage (JavaCvsFileSystemBeanInfo.class, "PROP_cvsIgnoreList")); //NOI18N cvsIgnore.setShortDescription (NbBundle.getMessage (JavaCvsFileSystemBeanInfo.class, "HINT_cvsIgnoreList")); //NOI18N PropertyDescriptor cvsPort = new PropertyDescriptor ("cvsPort", JavaCvsFileSystem.class); //NOI18N cvsPort.setDisplayName (NbBundle.getMessage (JavaCvsFileSystemBeanInfo.class, "PROP_cvsPort")); //NOI18N cvsPort.setShortDescription (NbBundle.getMessage (JavaCvsFileSystemBeanInfo.class, "HINT_cvsPort")); //NOI18N cvsPort.setExpert(true); PropertyDescriptor ignored = new PropertyDescriptor ("fsIgnoredFiles", JavaCvsFileSystem.class); //NOI18N ignored.setDisplayName (NbBundle.getMessage (JavaCvsFileSystemBeanInfo.class, "PROP_fsIgnoredFiles")); //NOI18N ignored.setShortDescription (NbBundle.getMessage (JavaCvsFileSystemBeanInfo.class, "HINT_fsIgnoredFiles")); //NOI18N ignored.setExpert(true); PropertyDescriptor createBackups = new PropertyDescriptor ("createBackups", JavaCvsFileSystem.class); //NOI18N createBackups.setDisplayName (NbBundle.getMessage (JavaCvsFileSystemBeanInfo.class, "PROP_createBackups")); //NOI18N createBackups.setShortDescription (NbBundle.getMessage (JavaCvsFileSystemBeanInfo.class, "HINT_createBackups")); //NOI18N createBackups.setExpert(true); return new PropertyDescriptor[] { readOnly, workingDir, relMount, offLine, autoRefresh, // zippedTransfer, // hideShadowFiles, cvsIgnore, cvsPort, ignored, createBackups }; } catch (IntrospectionException ie) { org.openide.ErrorManager.getDefault().notify(ie); return null; } } public Image getIcon (int type) { if ((type == BeanInfo.ICON_COLOR_16x16) || (type == BeanInfo.ICON_MONO_16x16)) { return org.openide.util.Utilities.loadImage ("org/netbeans/modules/javacvs/JavaCvsFileSystemIcon.gif"); //NOI18N; } else { return org.openide.util.Utilities.loadImage ("org/netbeans/modules/javacvs/JavaCvsFileSystemIcon32.gif"); //NOI18N; } } /** A directory chooser with special context help. */ /* public static class RootEd extends DirectoryOnlyEditor { protected HelpCtx getHelpCtx () { return new HelpCtx (RootEd.class); } } */ } |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.