mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 03:51:58 -08:00
Added set codes info in download window;
This commit is contained in:
parent
20a3b0b777
commit
0c18f96ce7
5 changed files with 19 additions and 11 deletions
|
|
@ -201,7 +201,7 @@
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JComboBox" name="comboSource">
|
<Component class="javax.swing.JComboBox" name="comboSource">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="maximumRowCount" type="int" value="10"/>
|
<Property name="maximumRowCount" type="int" value="15"/>
|
||||||
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
|
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
|
||||||
<StringArray count="4">
|
<StringArray count="4">
|
||||||
<StringItem index="0" value="Item 1"/>
|
<StringItem index="0" value="Item 1"/>
|
||||||
|
|
@ -248,7 +248,7 @@
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JComboBox" name="comboLanguage">
|
<Component class="javax.swing.JComboBox" name="comboLanguage">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="maximumRowCount" type="int" value="20"/>
|
<Property name="maximumRowCount" type="int" value="15"/>
|
||||||
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
|
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
|
||||||
<StringArray count="4">
|
<StringArray count="4">
|
||||||
<StringItem index="0" value="Item 1"/>
|
<StringItem index="0" value="Item 1"/>
|
||||||
|
|
@ -309,7 +309,7 @@
|
||||||
<SubComponents>
|
<SubComponents>
|
||||||
<Component class="javax.swing.JComboBox" name="comboSets">
|
<Component class="javax.swing.JComboBox" name="comboSets">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="maximumRowCount" type="int" value="20"/>
|
<Property name="maximumRowCount" type="int" value="15"/>
|
||||||
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
|
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
|
||||||
<StringArray count="4">
|
<StringArray count="4">
|
||||||
<StringItem index="0" value="Item 1"/>
|
<StringItem index="0" value="Item 1"/>
|
||||||
|
|
|
||||||
|
|
@ -287,7 +287,7 @@ public class DownloadImagesDialog extends MageDialog {
|
||||||
labelSource.setText("Images source to download:");
|
labelSource.setText("Images source to download:");
|
||||||
panelSourceLeft.add(labelSource);
|
panelSourceLeft.add(labelSource);
|
||||||
|
|
||||||
comboSource.setMaximumRowCount(10);
|
comboSource.setMaximumRowCount(15);
|
||||||
comboSource.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
|
comboSource.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
|
||||||
comboSource.setMinimumSize(new java.awt.Dimension(300, 20));
|
comboSource.setMinimumSize(new java.awt.Dimension(300, 20));
|
||||||
comboSource.setPreferredSize(new java.awt.Dimension(400, 25));
|
comboSource.setPreferredSize(new java.awt.Dimension(400, 25));
|
||||||
|
|
@ -304,7 +304,7 @@ public class DownloadImagesDialog extends MageDialog {
|
||||||
labelLanguage.setText("Language:");
|
labelLanguage.setText("Language:");
|
||||||
panelSourceRight.add(labelLanguage);
|
panelSourceRight.add(labelLanguage);
|
||||||
|
|
||||||
comboLanguage.setMaximumRowCount(20);
|
comboLanguage.setMaximumRowCount(15);
|
||||||
comboLanguage.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
|
comboLanguage.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
|
||||||
comboLanguage.setPreferredSize(new java.awt.Dimension(90, 25));
|
comboLanguage.setPreferredSize(new java.awt.Dimension(90, 25));
|
||||||
panelSourceRight.add(comboLanguage);
|
panelSourceRight.add(comboLanguage);
|
||||||
|
|
@ -327,7 +327,7 @@ public class DownloadImagesDialog extends MageDialog {
|
||||||
|
|
||||||
panelModeSelect.setLayout(new javax.swing.BoxLayout(panelModeSelect, javax.swing.BoxLayout.X_AXIS));
|
panelModeSelect.setLayout(new javax.swing.BoxLayout(panelModeSelect, javax.swing.BoxLayout.X_AXIS));
|
||||||
|
|
||||||
comboSets.setMaximumRowCount(20);
|
comboSets.setMaximumRowCount(15);
|
||||||
comboSets.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
|
comboSets.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
|
||||||
comboSets.setPreferredSize(new java.awt.Dimension(373, 25));
|
comboSets.setPreferredSize(new java.awt.Dimension(373, 25));
|
||||||
panelModeSelect.add(comboSets);
|
panelModeSelect.add(comboSets);
|
||||||
|
|
@ -412,7 +412,7 @@ public class DownloadImagesDialog extends MageDialog {
|
||||||
}//GEN-LAST:event_closeDialog
|
}//GEN-LAST:event_closeDialog
|
||||||
|
|
||||||
private void buttonSearchSetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSearchSetActionPerformed
|
private void buttonSearchSetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSearchSetActionPerformed
|
||||||
FastSearchUtil.showFastSearchForStringComboBox(comboSets, FastSearchUtil.DEFAULT_EXPANSION_SEARCH_MESSAGE);
|
FastSearchUtil.showFastSearchForStringComboBox(comboSets, FastSearchUtil.DEFAULT_EXPANSION_SEARCH_MESSAGE, 400, 500);
|
||||||
}//GEN-LAST:event_buttonSearchSetActionPerformed
|
}//GEN-LAST:event_buttonSearchSetActionPerformed
|
||||||
|
|
||||||
private void buttonStopActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonStopActionPerformed
|
private void buttonStopActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonStopActionPerformed
|
||||||
|
|
|
||||||
|
|
@ -180,8 +180,8 @@ public class PickChoiceDialog extends MageDialog {
|
||||||
this.setVisible(true);
|
this.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setWindowSize(int width, int heigth) {
|
public void setWindowSize(int width, int height) {
|
||||||
this.setSize(new Dimension(width, heigth));
|
this.setSize(new Dimension(width, height));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadData() {
|
private void loadData() {
|
||||||
|
|
|
||||||
|
|
@ -19,12 +19,16 @@ public class FastSearchUtil {
|
||||||
public static String DEFAULT_EXPANSION_SEARCH_MESSAGE = "Select set or expansion";
|
public static String DEFAULT_EXPANSION_SEARCH_MESSAGE = "Select set or expansion";
|
||||||
public static String DEFAULT_EXPANSION_TOOLTIP_MESSAGE = "Fast search set or expansion";
|
public static String DEFAULT_EXPANSION_TOOLTIP_MESSAGE = "Fast search set or expansion";
|
||||||
|
|
||||||
|
public static void showFastSearchForStringComboBox(JComboBox combo, String chooseMessage){
|
||||||
|
showFastSearchForStringComboBox(combo, chooseMessage, 300, 500);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show fast choice modal dialog with incremental searching for any string combobox components
|
* Show fast choice modal dialog with incremental searching for any string combobox components
|
||||||
* @param combo combobox control with default data model
|
* @param combo combobox control with default data model
|
||||||
* @param chooseMessage caption message for dialog
|
* @param chooseMessage caption message for dialog
|
||||||
*/
|
*/
|
||||||
public static void showFastSearchForStringComboBox(JComboBox combo, String chooseMessage){
|
public static void showFastSearchForStringComboBox(JComboBox combo, String chooseMessage, int windowWidth, int windowHeight){
|
||||||
// fast search/choice dialog for string combobox
|
// fast search/choice dialog for string combobox
|
||||||
|
|
||||||
mage.choices.Choice choice = new ChoiceImpl(false);
|
mage.choices.Choice choice = new ChoiceImpl(false);
|
||||||
|
|
@ -51,7 +55,7 @@ public class FastSearchUtil {
|
||||||
|
|
||||||
// ask for new value
|
// ask for new value
|
||||||
PickChoiceDialog dlg = new PickChoiceDialog();
|
PickChoiceDialog dlg = new PickChoiceDialog();
|
||||||
dlg.setWindowSize(300, 500);
|
dlg.setWindowSize(windowWidth, windowHeight);
|
||||||
dlg.showDialog(choice, needSelectValue);
|
dlg.showDialog(choice, needSelectValue);
|
||||||
if(choice.isChosen()){
|
if(choice.isChosen()){
|
||||||
item = choice.getChoiceKey();
|
item = choice.getChoiceKey();
|
||||||
|
|
|
||||||
|
|
@ -243,11 +243,15 @@ public class DownloadPicturesService extends DefaultBoundedRangeModel implements
|
||||||
cal.setTime(exp.getReleaseDate());
|
cal.setTime(exp.getReleaseDate());
|
||||||
String year = String.valueOf(cal.get(Calendar.YEAR));
|
String year = String.valueOf(cal.get(Calendar.YEAR));
|
||||||
|
|
||||||
|
return exp.getName() + " (" + exp.getCode() + ", " + year + ")";
|
||||||
|
|
||||||
|
/*
|
||||||
if (!exp.getName().contains(year)) {
|
if (!exp.getName().contains(year)) {
|
||||||
return exp.getName() + " (" + year + ")";
|
return exp.getName() + " (" + year + ")";
|
||||||
} else {
|
} else {
|
||||||
return exp.getName();
|
return exp.getName();
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
private ExpansionSet findSetByNameWithYear(String name) {
|
private ExpansionSet findSetByNameWithYear(String name) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue