X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fnet%2Fpterodactylus%2Fjsite%2Fgui%2FFileManager.java;h=af1637e03f144325f722fc6ae4d76f348ca0e3e0;hb=5e5d4cb3b2789b4d3ba801e297da27f09003f306;hp=e827008a084acebe04e9398d8b4f9d9691ce39cc;hpb=c7defb27215d24fb5609ce1a41ef1414b3333929;p=jSite2.git diff --git a/src/net/pterodactylus/jsite/gui/FileManager.java b/src/net/pterodactylus/jsite/gui/FileManager.java index e827008..af1637e 100644 --- a/src/net/pterodactylus/jsite/gui/FileManager.java +++ b/src/net/pterodactylus/jsite/gui/FileManager.java @@ -46,6 +46,7 @@ import java.util.logging.Logger; import javax.swing.BorderFactory; import javax.swing.JButton; +import javax.swing.JCheckBox; import javax.swing.JCheckBoxMenuItem; import javax.swing.JDialog; import javax.swing.JLabel; @@ -137,6 +138,15 @@ public class FileManager extends JDialog implements I18nable, ActionListener, Tr /** The “file size” text field. */ private JTextField fileSizeTextField; + /** The “override” label. */ + private I18nLabel overrideLabel; + + /** The “override active” action. */ + private I18nAction overrideAction; + + /** The “override action” checkbox. */ + private JCheckBox overrideCheckBox; + /** The context menu for the tree. */ private JPopupMenu treeContextMenu; @@ -242,6 +252,14 @@ public class FileManager extends JDialog implements I18nable, ActionListener, Tr /* TODO */ } }; + overrideAction = new I18nAction("fileManager.checkbox.overrideActive") { + /** + * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent) + */ + public void actionPerformed(ActionEvent actionEvent) { + /* TODO */ + } + }; } /** @@ -319,8 +337,16 @@ public class FileManager extends JDialog implements I18nable, ActionListener, Tr propertiesPanel.add(fileSizeLabel, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(12, 24, 0, 0), 0, 0)); propertiesPanel.add(fileSizeTextField, new GridBagConstraints(1, 3, 1, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(12, 12, 0, 0), 0, 0)); + /* override settings. */ + overrideLabel = new I18nLabel("fileManager.label.override"); + overrideLabel.setFont(overrideLabel.getFont().deriveFont(Font.BOLD)); + propertiesPanel.add(overrideLabel, new GridBagConstraints(0, 4, 2, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(24, 0, 0, 0), 0, 0)); + + overrideCheckBox = new JCheckBox(overrideAction); + propertiesPanel.add(overrideCheckBox, new GridBagConstraints(0, 5, 2, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(12, 24, 0, 0), 0, 0)); + /* glue panel. */ - propertiesPanel.add(new JPanel(), new GridBagConstraints(0, 4, 2, 1, 1.0, 1.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); + propertiesPanel.add(new JPanel(), new GridBagConstraints(0, 6, 2, 1, 1.0, 1.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); /* action button panel */ JPanel actionButtonPanel = new JPanel(new FlowLayout(FlowLayout.LEADING, 12, 12));