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
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:
- 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
- When this is run, a dialog is shown with the various file attributes.
- Use the 'Choose the file' button to select a file.
- 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.
- The 'Set' button sets the attributes for the currently selected file, see above for the use of the
'set mask' and 'set value' checkboxes.
- If you check 'Use container', the selected file's container will be shown.
private static final String[] attrNames
private static final int[] attrValues
private static final String kHelpText
DiskObject currentDiskObject
FileAttributesRow[] theRows
Button btnSet
Button btnChoose
Checkbox checkUseContainer
Label labelResults
public FileAttributesTest()
private void chooseButtonHit()
private void setButtonHit()
public boolean handleEvent(Event ev)
- Overrides:
- handleEvent in class Component
private Panel makeControlPanel()
private Panel makeAttrsPanel()
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