FileDocCategorySizeDatePackage
TextModePanel.javaAPI DocExample2909Wed Feb 15 06:24:52 GMT 2006None

TextModePanel

public class TextModePanel extends JPanel

Fields Summary
JCheckBox
bigEndian
JCheckBox
deflated
JCheckBox
gzipped
ButtonGroup
dataTypes
JRadioButton
asciiRadio
JRadioButton
decimalRadio
JRadioButton
hexRadio
JRadioButton
shortRadio
JRadioButton
intRadio
JRadioButton
longRadio
JRadioButton
floatRadio
JRadioButton
doubleRadio
JTextField
password
JList
encodings
Constructors Summary
public TextModePanel()

  
    

    Map charsets = Charset.availableCharsets();
    encodings.setListData(charsets.keySet().toArray());
    
    this.setLayout(new GridLayout(1, 2));
    
    JPanel left = new JPanel();
    JScrollPane right = new JScrollPane(encodings);
    left.setLayout(new GridLayout(13, 1));
    left.add(bigEndian);
    left.add(deflated);
    left.add(gzipped);
    
    left.add(asciiRadio);
    asciiRadio.setSelected(true);
    left.add(decimalRadio);
    left.add(hexRadio);
    left.add(shortRadio);
    left.add(intRadio);
    left.add(longRadio);
    left.add(floatRadio);
    left.add(doubleRadio);
    
    dataTypes.add(asciiRadio);
    dataTypes.add(decimalRadio);
    dataTypes.add(hexRadio);
    dataTypes.add(shortRadio);
    dataTypes.add(intRadio);
    dataTypes.add(longRadio);
    dataTypes.add(floatRadio);
    dataTypes.add(doubleRadio);
    
    left.add(password);
    this.add(left);
    this.add(right);
  
Methods Summary
public java.lang.StringgetEncoding()

    return (String) encodings.getSelectedValue();
  
public intgetMode()


    if (asciiRadio.isSelected()) return FileDumper6.ASC;
    else if (decimalRadio.isSelected()) return FileDumper6.DEC;
    else if (hexRadio.isSelected()) return FileDumper6.HEX;
    else if (shortRadio.isSelected()) return FileDumper6.SHORT;
    else if (intRadio.isSelected()) return FileDumper6.INT;
    else if (longRadio.isSelected()) return FileDumper6.LONG;
    else if (floatRadio.isSelected()) return FileDumper6.FLOAT;
    else if (doubleRadio.isSelected()) return FileDumper6.DOUBLE;
    else return FileDumper6.ASC;
  
public java.lang.StringgetPassword()

    return password.getText();
  
public booleanisBigEndian()

    return bigEndian.isSelected();
  
public booleanisDeflated()

    return deflated.isSelected();
  
public booleanisGZipped()

    return gzipped.isSelected();
  
public booleanisText()

    if (this.getMode() == FileDumper6.ASC) return true;
    return false;