예제 #1
0
  private void createEditorDialog() {

    int w = top.getSize().width;
    //      int h = top.getSize().height;

    editorDialog = new JDialog(top, true);
    editorDialog.setTitle(rb.getString("dialog.editor.title"));

    JPanel base = new JPanel(new GridLayout(2, 1));
    editorDialog.getContentPane().add(base);

    JPanel p = new JPanel(new BorderLayout());
    p.setPreferredSize(new Dimension(w * 6 / 10, 0));
    editorChooser = new JFileChooserHistoryComboBox();
    editorChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
    p.add(BorderLayout.SOUTH, editorChooser);
    base.add(p);

    p = new JPanel();

    okEditorDialogButton = new JButton();
    okEditorDialogButton.setText(rb.getString("dialog.common.button.ok.text"));
    editorDialog.getRootPane().setDefaultButton(okEditorDialogButton);
    p.add(okEditorDialogButton);

    cancelEditorDialogButton = new JButton();
    cancelEditorDialogButton.setText(rb.getString("dialog.common.button.cancel.text"));
    p.add(cancelEditorDialogButton);
    base.add(p);

    editorDialog.pack();
  }
예제 #2
0
  private void createSaveListDialog() {

    int w = top.getSize().width;
    // int h = top.getSize().height;

    saveListDialog = new JDialog(top, true);
    saveListDialog.setTitle(rb.getString("dialog.seveList.title"));

    JPanel base = new JPanel(new BorderLayout());
    saveListDialog.getContentPane().add(base);

    JPanel p = new JPanel(new GridLayout(2, 1));
    JLabel l = new JLabel(rb.getString("dialog.seveList.label.0.text"));
    l.setPreferredSize(new Dimension(w * 6 / 10, 0));
    p.add(l);

    listFileChooser = new JFileChooserHistoryComboBox();
    listFileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
    p.add(listFileChooser);

    base.add(BorderLayout.NORTH, p);

    p = new JPanel(new GridLayout(6, 1));
    l = new JLabel(rb.getString("dialog.seveList.label.1.text"));
    p.add(l);

    hasIdentical = new JCheckBox();
    hasIdentical.setText(rb.getString("dialog.seveList.checkBox.0.text"));
    p.add(hasIdentical);
    hasDifferent = new JCheckBox(rb.getString("dialog.seveList.checkBox.1.text"));
    p.add(hasDifferent);
    hasLeft = new JCheckBox(rb.getString("dialog.seveList.checkBox.2.text"));
    p.add(hasLeft);
    hasRight = new JCheckBox(rb.getString("dialog.seveList.checkBox.3.text"));
    p.add(hasRight);
    hasNotMarked = new JCheckBox(rb.getString("dialog.seveList.checkBox.4.text"));
    p.add(hasNotMarked);

    base.add(BorderLayout.CENTER, p);

    p = new JPanel();
    okSaveListDialogButton = new JButton();
    okSaveListDialogButton.setText(rb.getString("dialog.common.button.ok.text"));
    saveListDialog.getRootPane().setDefaultButton(okSaveListDialogButton);
    p.add(okSaveListDialogButton);

    cancelSaveListDialogButton = new JButton();
    cancelSaveListDialogButton.setText(rb.getString("dialog.common.button.cancel.text"));
    p.add(cancelSaveListDialogButton);

    base.add(BorderLayout.SOUTH, p);

    saveListDialog.pack();
  }
예제 #3
0
 void pageEditorChooser() {
   editorChooser.requestFocus();
   editorDialog.setLocationRelativeTo(top);
   editorDialog.setVisible(true);
 }
예제 #4
0
 void initEditorDialog(File file) {
   editorChooser.setCurrentDirectory(file);
   editorChooser.setSelectedFile(file);
 }
예제 #5
0
 void initCompareTargetsDialog(File left, File right) {
   leftTargetChooser.setCurrentDirectory(left);
   leftTargetChooser.setSelectedFile(left);
   rightTargetChooser.setCurrentDirectory(right);
   rightTargetChooser.setSelectedFile(right);
 }