mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Tab for card images location configuration.
This commit is contained in:
parent
5e79f51f1d
commit
4d05d71aa3
2 changed files with 186 additions and 0 deletions
|
@ -363,6 +363,103 @@
|
||||||
</Component>
|
</Component>
|
||||||
</SubComponents>
|
</SubComponents>
|
||||||
</Container>
|
</Container>
|
||||||
|
<Container class="javax.swing.JPanel" name="jPanel4">
|
||||||
|
<Constraints>
|
||||||
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
|
||||||
|
<JTabbedPaneConstraints tabName="Images">
|
||||||
|
<Property name="tabTitle" type="java.lang.String" value="Images"/>
|
||||||
|
</JTabbedPaneConstraints>
|
||||||
|
</Constraint>
|
||||||
|
</Constraints>
|
||||||
|
|
||||||
|
<Layout>
|
||||||
|
<DimensionLayout dim="0">
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Component id="jPanel5" max="32767" attributes="0"/>
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
|
</DimensionLayout>
|
||||||
|
<DimensionLayout dim="1">
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Component id="jPanel5" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace pref="91" max="32767" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
|
</DimensionLayout>
|
||||||
|
</Layout>
|
||||||
|
<SubComponents>
|
||||||
|
<Container class="javax.swing.JPanel" name="jPanel5">
|
||||||
|
<Properties>
|
||||||
|
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||||
|
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
|
||||||
|
<TitledBorder title="Card images location:"/>
|
||||||
|
</Border>
|
||||||
|
</Property>
|
||||||
|
</Properties>
|
||||||
|
|
||||||
|
<Layout>
|
||||||
|
<DimensionLayout dim="0">
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Group type="102" attributes="0">
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Group type="102" attributes="0">
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Component id="useDefaultImageFolder" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<EmptySpace min="-2" pref="19" max="-2" attributes="0"/>
|
||||||
|
<Component id="imageFolderPath" min="-2" pref="284" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||||
|
<Component id="browseButton" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
|
<EmptySpace pref="19" max="32767" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
|
</DimensionLayout>
|
||||||
|
<DimensionLayout dim="1">
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Component id="useDefaultImageFolder" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||||
|
<Group type="103" groupAlignment="3" attributes="0">
|
||||||
|
<Component id="imageFolderPath" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
|
<Component id="browseButton" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
<EmptySpace pref="75" max="32767" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
|
</DimensionLayout>
|
||||||
|
</Layout>
|
||||||
|
<SubComponents>
|
||||||
|
<Component class="javax.swing.JCheckBox" name="useDefaultImageFolder">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" value="use default"/>
|
||||||
|
</Properties>
|
||||||
|
<Events>
|
||||||
|
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="useDefaultImageFolderActionPerformed"/>
|
||||||
|
</Events>
|
||||||
|
</Component>
|
||||||
|
<Component class="javax.swing.JTextField" name="imageFolderPath">
|
||||||
|
</Component>
|
||||||
|
<Component class="javax.swing.JButton" name="browseButton">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" value="Browse..."/>
|
||||||
|
</Properties>
|
||||||
|
<Events>
|
||||||
|
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="browseButtonActionPerformed"/>
|
||||||
|
</Events>
|
||||||
|
</Component>
|
||||||
|
</SubComponents>
|
||||||
|
</Container>
|
||||||
|
</SubComponents>
|
||||||
|
</Container>
|
||||||
</SubComponents>
|
</SubComponents>
|
||||||
</Container>
|
</Container>
|
||||||
<Component class="javax.swing.JButton" name="saveButton">
|
<Component class="javax.swing.JButton" name="saveButton">
|
||||||
|
|
|
@ -103,6 +103,11 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
||||||
checkBoxEndOfCOthers = new javax.swing.JCheckBox();
|
checkBoxEndOfCOthers = new javax.swing.JCheckBox();
|
||||||
checkBoxMain2Others = new javax.swing.JCheckBox();
|
checkBoxMain2Others = new javax.swing.JCheckBox();
|
||||||
checkBoxEndTurnOthers = new javax.swing.JCheckBox();
|
checkBoxEndTurnOthers = new javax.swing.JCheckBox();
|
||||||
|
jPanel4 = new javax.swing.JPanel();
|
||||||
|
jPanel5 = new javax.swing.JPanel();
|
||||||
|
useDefaultImageFolder = new javax.swing.JCheckBox();
|
||||||
|
imageFolderPath = new javax.swing.JTextField();
|
||||||
|
browseButton = new javax.swing.JButton();
|
||||||
saveButton = new javax.swing.JButton();
|
saveButton = new javax.swing.JButton();
|
||||||
exitButton = new javax.swing.JButton();
|
exitButton = new javax.swing.JButton();
|
||||||
|
|
||||||
|
@ -293,6 +298,69 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
||||||
|
|
||||||
jTabbedPane1.addTab("Phases", jPanel2);
|
jTabbedPane1.addTab("Phases", jPanel2);
|
||||||
|
|
||||||
|
jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder("Card images location:"));
|
||||||
|
|
||||||
|
useDefaultImageFolder.setText("use default");
|
||||||
|
useDefaultImageFolder.addActionListener(new java.awt.event.ActionListener() {
|
||||||
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||||
|
useDefaultImageFolderActionPerformed(evt);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
browseButton.setText("Browse...");
|
||||||
|
browseButton.addActionListener(new java.awt.event.ActionListener() {
|
||||||
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||||
|
browseButtonActionPerformed(evt);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
|
||||||
|
jPanel5.setLayout(jPanel5Layout);
|
||||||
|
jPanel5Layout.setHorizontalGroup(
|
||||||
|
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addGroup(jPanel5Layout.createSequentialGroup()
|
||||||
|
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addGroup(jPanel5Layout.createSequentialGroup()
|
||||||
|
.addContainerGap()
|
||||||
|
.addComponent(useDefaultImageFolder))
|
||||||
|
.addGroup(jPanel5Layout.createSequentialGroup()
|
||||||
|
.addGap(19, 19, 19)
|
||||||
|
.addComponent(imageFolderPath, javax.swing.GroupLayout.PREFERRED_SIZE, 284, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||||
|
.addComponent(browseButton)))
|
||||||
|
.addContainerGap(19, Short.MAX_VALUE))
|
||||||
|
);
|
||||||
|
jPanel5Layout.setVerticalGroup(
|
||||||
|
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addGroup(jPanel5Layout.createSequentialGroup()
|
||||||
|
.addContainerGap()
|
||||||
|
.addComponent(useDefaultImageFolder)
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||||
|
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||||
|
.addComponent(imageFolderPath, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
|
.addComponent(browseButton))
|
||||||
|
.addContainerGap(75, Short.MAX_VALUE))
|
||||||
|
);
|
||||||
|
|
||||||
|
javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
|
||||||
|
jPanel4.setLayout(jPanel4Layout);
|
||||||
|
jPanel4Layout.setHorizontalGroup(
|
||||||
|
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addGroup(jPanel4Layout.createSequentialGroup()
|
||||||
|
.addContainerGap()
|
||||||
|
.addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
|
.addContainerGap())
|
||||||
|
);
|
||||||
|
jPanel4Layout.setVerticalGroup(
|
||||||
|
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addGroup(jPanel4Layout.createSequentialGroup()
|
||||||
|
.addContainerGap()
|
||||||
|
.addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
|
.addContainerGap(91, Short.MAX_VALUE))
|
||||||
|
);
|
||||||
|
|
||||||
|
jTabbedPane1.addTab("Images", jPanel4);
|
||||||
|
|
||||||
saveButton.setLabel("Save");
|
saveButton.setLabel("Save");
|
||||||
saveButton.addActionListener(new java.awt.event.ActionListener() {
|
saveButton.addActionListener(new java.awt.event.ActionListener() {
|
||||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||||
|
@ -373,6 +441,22 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
||||||
// TODO add your handling code here:
|
// TODO add your handling code here:
|
||||||
}//GEN-LAST:event_displayBigCardsInHandActionPerformed
|
}//GEN-LAST:event_displayBigCardsInHandActionPerformed
|
||||||
|
|
||||||
|
private void useDefaultImageFolderActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_useDefaultImageFolderActionPerformed
|
||||||
|
if (useDefaultImageFolder.isSelected()) {
|
||||||
|
imageFolderPath.setText("./plugins/images/");
|
||||||
|
imageFolderPath.setEnabled(false);
|
||||||
|
browseButton.setEnabled(false);
|
||||||
|
} else {
|
||||||
|
imageFolderPath.setText("");
|
||||||
|
imageFolderPath.setEnabled(true);
|
||||||
|
browseButton.setEnabled(true);
|
||||||
|
}
|
||||||
|
}//GEN-LAST:event_useDefaultImageFolderActionPerformed
|
||||||
|
|
||||||
|
private void browseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseButtonActionPerformed
|
||||||
|
// TODO add your handling code here:
|
||||||
|
}//GEN-LAST:event_browseButtonActionPerformed
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param args the command line arguments
|
* @param args the command line arguments
|
||||||
*/
|
*/
|
||||||
|
@ -448,6 +532,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||||
|
private javax.swing.JButton browseButton;
|
||||||
private javax.swing.JCheckBox checkBoxBeforeCOthers;
|
private javax.swing.JCheckBox checkBoxBeforeCOthers;
|
||||||
private javax.swing.JCheckBox checkBoxBeforeCYou;
|
private javax.swing.JCheckBox checkBoxBeforeCYou;
|
||||||
private javax.swing.JCheckBox checkBoxDrawOthers;
|
private javax.swing.JCheckBox checkBoxDrawOthers;
|
||||||
|
@ -464,6 +549,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
||||||
private javax.swing.JCheckBox checkBoxUpkeepYou;
|
private javax.swing.JCheckBox checkBoxUpkeepYou;
|
||||||
private javax.swing.JCheckBox displayBigCardsInHand;
|
private javax.swing.JCheckBox displayBigCardsInHand;
|
||||||
private javax.swing.JButton exitButton;
|
private javax.swing.JButton exitButton;
|
||||||
|
private javax.swing.JTextField imageFolderPath;
|
||||||
private javax.swing.JLabel jLabel1;
|
private javax.swing.JLabel jLabel1;
|
||||||
private javax.swing.JLabel jLabel10;
|
private javax.swing.JLabel jLabel10;
|
||||||
private javax.swing.JLabel jLabel2;
|
private javax.swing.JLabel jLabel2;
|
||||||
|
@ -477,9 +563,12 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
||||||
private javax.swing.JPanel jPanel1;
|
private javax.swing.JPanel jPanel1;
|
||||||
private javax.swing.JPanel jPanel2;
|
private javax.swing.JPanel jPanel2;
|
||||||
private javax.swing.JPanel jPanel3;
|
private javax.swing.JPanel jPanel3;
|
||||||
|
private javax.swing.JPanel jPanel4;
|
||||||
|
private javax.swing.JPanel jPanel5;
|
||||||
private javax.swing.JTabbedPane jTabbedPane1;
|
private javax.swing.JTabbedPane jTabbedPane1;
|
||||||
private javax.swing.JButton saveButton;
|
private javax.swing.JButton saveButton;
|
||||||
private javax.swing.JCheckBox showToolTipsInHand;
|
private javax.swing.JCheckBox showToolTipsInHand;
|
||||||
|
private javax.swing.JCheckBox useDefaultImageFolder;
|
||||||
// End of variables declaration//GEN-END:variables
|
// End of variables declaration//GEN-END:variables
|
||||||
|
|
||||||
private static final PreferencesDialog dialog = new PreferencesDialog(new javax.swing.JFrame(), true);
|
private static final PreferencesDialog dialog = new PreferencesDialog(new javax.swing.JFrame(), true);
|
||||||
|
|
Loading…
Reference in a new issue