Add option to hide recent item list
This commit is contained in:
parent
d4fe280201
commit
46c0465b1a
@ -8,18 +8,18 @@
|
|||||||
<Properties>
|
<Properties>
|
||||||
<Property name="closable" type="boolean" value="true"/>
|
<Property name="closable" type="boolean" value="true"/>
|
||||||
<Property name="iconifiable" type="boolean" value="true"/>
|
<Property name="iconifiable" type="boolean" value="true"/>
|
||||||
<Property name="title" type="java.lang.String" value="Theme"/>
|
<Property name="title" type="java.lang.String" value="Display"/>
|
||||||
<Property name="frameIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
<Property name="frameIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||||
<Image iconType="3" name="/net/apocalypselabs/symat/icons/settings.png"/>
|
<Image iconType="3" name="/net/apocalypselabs/symat/icons/settings.png"/>
|
||||||
</Property>
|
</Property>
|
||||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
<Dimension value="[170, 188]"/>
|
<Dimension value="[160, 215]"/>
|
||||||
</Property>
|
</Property>
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
<Dimension value="[170, 188]"/>
|
<Dimension value="[160, 215]"/>
|
||||||
</Property>
|
</Property>
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
<Dimension value="[170, 188]"/>
|
<Dimension value="[160, 215]"/>
|
||||||
</Property>
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
<SyntheticProperties>
|
<SyntheticProperties>
|
||||||
@ -44,15 +44,17 @@
|
|||||||
<DimensionLayout dim="0">
|
<DimensionLayout dim="0">
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Group type="102" attributes="0">
|
<Group type="102" attributes="0">
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Component id="jPanel1" max="32767" attributes="0"/>
|
<Component id="saveBtn" alignment="1" min="-2" pref="73" max="-2" attributes="0"/>
|
||||||
<Group type="102" alignment="1" attributes="0">
|
<Group type="103" alignment="1" groupAlignment="1" max="-2" attributes="0">
|
||||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
<Component id="jPanel1" alignment="0" max="32767" attributes="0"/>
|
||||||
<Component id="saveBtn" min="-2" pref="73" max="-2" attributes="0"/>
|
<Group type="102" alignment="0" attributes="0">
|
||||||
</Group>
|
|
||||||
</Group>
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Component id="showRecent" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
|
<EmptySpace pref="25" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
@ -61,8 +63,10 @@
|
|||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<Component id="jPanel1" min="-2" max="-2" attributes="0"/>
|
<Component id="jPanel1" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||||
|
<Component id="showRecent" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||||
<Component id="saveBtn" min="-2" max="-2" attributes="0"/>
|
<Component id="saveBtn" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace pref="41" max="32767" attributes="0"/>
|
<EmptySpace pref="42" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
@ -87,7 +91,7 @@
|
|||||||
<Component id="themeLight" alignment="0" min="-2" max="-2" attributes="0"/>
|
<Component id="themeLight" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
<Component id="themeDark" alignment="0" min="-2" max="-2" attributes="0"/>
|
<Component id="themeDark" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace pref="43" max="32767" attributes="0"/>
|
<EmptySpace max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
@ -110,7 +114,7 @@
|
|||||||
<ComponentRef name="themeGroup"/>
|
<ComponentRef name="themeGroup"/>
|
||||||
</Property>
|
</Property>
|
||||||
<Property name="selected" type="boolean" value="true"/>
|
<Property name="selected" type="boolean" value="true"/>
|
||||||
<Property name="text" type="java.lang.String" value="Daylight"/>
|
<Property name="text" type="java.lang.String" value="Day"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JRadioButton" name="themeDark">
|
<Component class="javax.swing.JRadioButton" name="themeDark">
|
||||||
@ -131,5 +135,11 @@
|
|||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="saveBtnActionPerformed"/>
|
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="saveBtnActionPerformed"/>
|
||||||
</Events>
|
</Events>
|
||||||
</Component>
|
</Component>
|
||||||
|
<Component class="javax.swing.JCheckBox" name="showRecent">
|
||||||
|
<Properties>
|
||||||
|
<Property name="selected" type="boolean" value="true"/>
|
||||||
|
<Property name="text" type="java.lang.String" value="Show recent items"/>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
</SubComponents>
|
</SubComponents>
|
||||||
</Form>
|
</Form>
|
||||||
|
@ -72,14 +72,15 @@ public class Display extends javax.swing.JInternalFrame {
|
|||||||
themeLight = new javax.swing.JRadioButton();
|
themeLight = new javax.swing.JRadioButton();
|
||||||
themeDark = new javax.swing.JRadioButton();
|
themeDark = new javax.swing.JRadioButton();
|
||||||
saveBtn = new javax.swing.JButton();
|
saveBtn = new javax.swing.JButton();
|
||||||
|
showRecent = new javax.swing.JCheckBox();
|
||||||
|
|
||||||
setClosable(true);
|
setClosable(true);
|
||||||
setIconifiable(true);
|
setIconifiable(true);
|
||||||
setTitle("Theme");
|
setTitle("Display");
|
||||||
setFrameIcon(new javax.swing.ImageIcon(getClass().getResource("/net/apocalypselabs/symat/icons/settings.png"))); // NOI18N
|
setFrameIcon(new javax.swing.ImageIcon(getClass().getResource("/net/apocalypselabs/symat/icons/settings.png"))); // NOI18N
|
||||||
setMaximumSize(new java.awt.Dimension(170, 188));
|
setMaximumSize(new java.awt.Dimension(160, 215));
|
||||||
setMinimumSize(new java.awt.Dimension(170, 188));
|
setMinimumSize(new java.awt.Dimension(160, 215));
|
||||||
setPreferredSize(new java.awt.Dimension(170, 188));
|
setPreferredSize(new java.awt.Dimension(160, 215));
|
||||||
addComponentListener(new java.awt.event.ComponentAdapter() {
|
addComponentListener(new java.awt.event.ComponentAdapter() {
|
||||||
public void componentShown(java.awt.event.ComponentEvent evt) {
|
public void componentShown(java.awt.event.ComponentEvent evt) {
|
||||||
formComponentShown(evt);
|
formComponentShown(evt);
|
||||||
@ -91,7 +92,7 @@ public class Display extends javax.swing.JInternalFrame {
|
|||||||
|
|
||||||
themeGroup.add(themeLight);
|
themeGroup.add(themeLight);
|
||||||
themeLight.setSelected(true);
|
themeLight.setSelected(true);
|
||||||
themeLight.setText("Daylight");
|
themeLight.setText("Day");
|
||||||
|
|
||||||
themeGroup.add(themeDark);
|
themeGroup.add(themeDark);
|
||||||
themeDark.setText("NightDark");
|
themeDark.setText("NightDark");
|
||||||
@ -105,7 +106,7 @@ public class Display extends javax.swing.JInternalFrame {
|
|||||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addComponent(themeLight)
|
.addComponent(themeLight)
|
||||||
.addComponent(themeDark))
|
.addComponent(themeDark))
|
||||||
.addContainerGap(43, Short.MAX_VALUE))
|
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||||
);
|
);
|
||||||
jPanel1Layout.setVerticalGroup(
|
jPanel1Layout.setVerticalGroup(
|
||||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
@ -124,26 +125,32 @@ public class Display extends javax.swing.JInternalFrame {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
showRecent.setSelected(true);
|
||||||
|
showRecent.setText("Show recent items");
|
||||||
|
|
||||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
||||||
getContentPane().setLayout(layout);
|
getContentPane().setLayout(layout);
|
||||||
layout.setHorizontalGroup(
|
layout.setHorizontalGroup(
|
||||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(layout.createSequentialGroup()
|
.addGroup(layout.createSequentialGroup()
|
||||||
.addContainerGap()
|
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
.addComponent(saveBtn, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
|
||||||
.addGap(0, 0, Short.MAX_VALUE)
|
.addComponent(jPanel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.addComponent(saveBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
|
||||||
.addContainerGap())
|
.addContainerGap()
|
||||||
|
.addComponent(showRecent))))
|
||||||
|
.addContainerGap(25, Short.MAX_VALUE))
|
||||||
);
|
);
|
||||||
layout.setVerticalGroup(
|
layout.setVerticalGroup(
|
||||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(layout.createSequentialGroup()
|
.addGroup(layout.createSequentialGroup()
|
||||||
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||||
|
.addComponent(showRecent)
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||||
.addComponent(saveBtn)
|
.addComponent(saveBtn)
|
||||||
.addContainerGap(41, Short.MAX_VALUE))
|
.addContainerGap(42, Short.MAX_VALUE))
|
||||||
);
|
);
|
||||||
|
|
||||||
pack();
|
pack();
|
||||||
@ -161,6 +168,10 @@ public class Display extends javax.swing.JInternalFrame {
|
|||||||
themeDark.setSelected(false);
|
themeDark.setSelected(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!PrefStorage.getSetting("showrecent", "").equals("")) {
|
||||||
|
showRecent.setSelected(false);
|
||||||
|
}
|
||||||
}//GEN-LAST:event_formComponentShown
|
}//GEN-LAST:event_formComponentShown
|
||||||
|
|
||||||
private void saveBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveBtnActionPerformed
|
private void saveBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveBtnActionPerformed
|
||||||
@ -169,6 +180,11 @@ public class Display extends javax.swing.JInternalFrame {
|
|||||||
} else {
|
} else {
|
||||||
PrefStorage.saveSetting("theme", "light");
|
PrefStorage.saveSetting("theme", "light");
|
||||||
}
|
}
|
||||||
|
if (showRecent.isSelected()) {
|
||||||
|
PrefStorage.saveSetting("showrecent", "");
|
||||||
|
} else {
|
||||||
|
PrefStorage.saveSetting("showrecent", "no");
|
||||||
|
}
|
||||||
PrefStorage.save();
|
PrefStorage.save();
|
||||||
MainGUI.updateDisplay();
|
MainGUI.updateDisplay();
|
||||||
dispose();
|
dispose();
|
||||||
@ -177,6 +193,7 @@ public class Display extends javax.swing.JInternalFrame {
|
|||||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||||
private javax.swing.JPanel jPanel1;
|
private javax.swing.JPanel jPanel1;
|
||||||
private javax.swing.JButton saveBtn;
|
private javax.swing.JButton saveBtn;
|
||||||
|
private javax.swing.JCheckBox showRecent;
|
||||||
private javax.swing.JRadioButton themeDark;
|
private javax.swing.JRadioButton themeDark;
|
||||||
private javax.swing.ButtonGroup themeGroup;
|
private javax.swing.ButtonGroup themeGroup;
|
||||||
private javax.swing.JRadioButton themeLight;
|
private javax.swing.JRadioButton themeLight;
|
||||||
|
@ -255,7 +255,7 @@
|
|||||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||||
<Image iconType="3" name="/net/apocalypselabs/symat/images/display.png"/>
|
<Image iconType="3" name="/net/apocalypselabs/symat/images/display.png"/>
|
||||||
</Property>
|
</Property>
|
||||||
<Property name="text" type="java.lang.String" value="Theme"/>
|
<Property name="text" type="java.lang.String" value="Display"/>
|
||||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||||
<Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
|
<Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
|
||||||
<EmptyBorder bottom="5" left="5" right="5" top="5"/>
|
<EmptyBorder bottom="5" left="5" right="5" top="5"/>
|
||||||
|
@ -200,6 +200,10 @@ public class MainGUI extends javax.swing.JFrame {
|
|||||||
setExtendedState(MAXIMIZED_BOTH);
|
setExtendedState(MAXIMIZED_BOTH);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!PrefStorage.getSetting("showrecent", "").equals("")) {
|
||||||
|
recentItemsPanel.setVisible(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void licenseRestrict(boolean restricted) {
|
public static void licenseRestrict(boolean restricted) {
|
||||||
@ -237,6 +241,11 @@ public class MainGUI extends javax.swing.JFrame {
|
|||||||
recentFileList.setForeground(Color.black);
|
recentFileList.setForeground(Color.black);
|
||||||
recentFileList.setBackground(Color.white);
|
recentFileList.setBackground(Color.white);
|
||||||
}
|
}
|
||||||
|
if (!PrefStorage.getSetting("showrecent", "").equals("")) {
|
||||||
|
recentItemsPanel.setVisible(false);
|
||||||
|
} else {
|
||||||
|
recentItemsPanel.setVisible(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -478,7 +487,7 @@ public class MainGUI extends javax.swing.JFrame {
|
|||||||
});
|
});
|
||||||
|
|
||||||
displaySettingsBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/apocalypselabs/symat/images/display.png"))); // NOI18N
|
displaySettingsBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/apocalypselabs/symat/images/display.png"))); // NOI18N
|
||||||
displaySettingsBtn.setText("Theme");
|
displaySettingsBtn.setText("Display");
|
||||||
displaySettingsBtn.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5));
|
displaySettingsBtn.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5));
|
||||||
displaySettingsBtn.setFocusable(false);
|
displaySettingsBtn.setFocusable(false);
|
||||||
displaySettingsBtn.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
|
displaySettingsBtn.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user