Main Page Cookbook/Overview ImageMeister the jcprops file Licensing Binary Installation & Configuration [ Win · Mac · Nix ] Changes Public API Source Code Main Page Java [ Common · Win · Mac · Nix ] Native Code [ Common · Win · Mac · Nix ] Manifest Native Code Overviews [ Common · Win · Mac · Nix · Strings ] Macros [ General · Native Macros ] Walkthroughs [ Java only · Java and native ] Building [ Win · Mac · Nix ] Distribution Issues

    All Packages  This Package  Class Hierarchy  Class Search  Index

Class com.tolstoy.testjc.FileAttributesTest

    java.lang.Object
       |
       +----java.awt.Component
               |
               +----java.awt.Container
                       |
                       +----java.awt.Window
                               |
                               +----java.awt.Frame
                                       |
                                       +----com.tolstoy.testjc.FileAttributesTest

Summary

    class  FileAttributesTest
         extends java.awt.Frame
    {
              // Fields 9
         private static final String[] attrNames;
         private static final int[] attrValues;
         Button btnChoose;
         Button btnSet;
         Checkbox checkUseContainer;
         DiskObject currentDiskObject;
         private static final String kHelpText;
         Label labelResults;
         FileAttributesRow[] theRows;

              // Constructors 1
         public FileAttributesTest();

              // Methods 6
         public static void main(String[]);

         private void chooseButtonHit();
         public boolean handleEvent(Event);
         private Panel makeAttrsPanel();
         private Panel makeControlPanel();
         private void setButtonHit();
    }

This dialog shows the attributes for files and directories.

See DiskFile.java for a list of these attributes.

This dialog also allows you to set the attributes for a file or directory.

Instructions:

1. Run this sample the same way as the other samples are run: using a batch file on Win, shell script on 'Nix, and JBindery on Mac. Follow the instructions for running Tester.java in wininfo.html, macinfo.html or nixinfo.html, just instead of using 'com.tolstoy.testjc.Tester', use 'com.tolstoy.testjc.FileAttributesTest' instead
2. When this is run, a dialog is shown with the various file attributes.
3. Use the 'Choose the file' button to select a file.
4. The parts of the dialog are as follows:
   - "ON" or "OFF" is printed in front of each attribute, indicating whether that attribute is on or off.
   - 'Setabl' and 'Getabl' follow the name of each attribute, and indicate whether that attribute is settable or gettable using DiskFile.setFlags() and DiskFile.getFlags(). These values were obtained using DiskFile.getSetFlagsMask() and DiskFile.getGetFlagsMask().
   - Two checkboxes follow. The first checkbox is used to make the mask that is passed to DiskFile.setFlags(), and the second checkbox is used to make the value. If the first checkbox is not checked, when you press the 'Set' button that attribute will not be changed. However, if the first checkbox is checked, when you press the 'Set' button, the attribute will be set to the value of the second checkbox. That is, if the second checkbox is unchecked, the attribute will be set to 0.
5. The 'Set' button sets the attributes for the currently selected file, see above for the use of the 'set mask' and 'set value' checkboxes.
6. If you check 'Use container', the selected file's container will be shown.

Fields

### · attrNames | Summary | Top

       private static final String[] attrNames

### · attrValues | Summary | Top

       private static final int[] attrValues

### · kHelpText | Summary | Top

       private static final String kHelpText

### · currentDiskObject | Summary | Top

       DiskObject currentDiskObject

### · theRows | Summary | Top

       FileAttributesRow[] theRows

### · btnSet | Summary | Top

       Button btnSet

### · btnChoose | Summary | Top

       Button btnChoose

### · checkUseContainer | Summary | Top

       Checkbox checkUseContainer

### · labelResults | Summary | Top

       Label labelResults

Constructors

### · FileAttributesTest | Summary | Top

       public FileAttributesTest()

Methods

### · chooseButtonHit | Summary | Top

       private void chooseButtonHit()

### · setButtonHit | Summary | Top

       private void setButtonHit()

### · handleEvent | Summary | Top

       public boolean handleEvent(Event ev)

> Overrides:
>   handleEvent in class Component

### · makeControlPanel | Summary | Top

       private Panel makeControlPanel()

### · makeAttrsPanel | Summary | Top

       private Panel makeAttrsPanel()

### · main | Summary | Top

       public static void main(String[] args)

    All Packages  This Package  Class Hierarchy  Class Search  Index

Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7