|
From: <sou...@us...> - 2006-03-04 07:45:43
|
Revision: 98 Author: soulcatcher Date: 2006-03-03 23:45:31 -0800 (Fri, 03 Mar 2006) ViewCVS: http://svn.sourceforge.net/pcgen/?rev=98&view=rev Log Message: ----------- more gui work Modified Paths: -------------- Trunk/pcgen/code/src/java/pcgen/gui/TableColumnManager.java Trunk/pcgen/code/src/java/pcgen/gui/tabs/spells/InfoKnownSpells.java Trunk/pcgen/code/src/java/pcgen/gui/tabs/spells/InfoPreparedSpells.java Trunk/pcgen/code/src/java/pcgen/gui/tabs/spells/InfoSpellBooks.java Trunk/pcgen/code/src/java/pcgen/gui/tabs/spells/SpellModel.java Added Paths: ----------- Trunk/pcgen/code/src/java/pcgen/gui/TableColumnManagerModel.java Removed Paths: ------------- Trunk/pcgen/code/src/java/pcgen/TableColumnManagerModel.java Deleted: Trunk/pcgen/code/src/java/pcgen/TableColumnManagerModel.java =================================================================== --- Trunk/pcgen/code/src/java/pcgen/TableColumnManagerModel.java 2006-03-04 07:16:57 UTC (rev 97) +++ Trunk/pcgen/code/src/java/pcgen/TableColumnManagerModel.java 2006-03-04 07:45:31 UTC (rev 98) @@ -1,10 +0,0 @@ -package pcgen; - -import java.util.List; - -public interface TableColumnManagerModel { - public List getMColumnList(); - public boolean isMColumnDisplayed(int col); - public void setMColumnDisplayed(int col, boolean disp); - public int getMColumnOffset(); -} Modified: Trunk/pcgen/code/src/java/pcgen/gui/TableColumnManager.java =================================================================== --- Trunk/pcgen/code/src/java/pcgen/gui/TableColumnManager.java 2006-03-04 07:16:57 UTC (rev 97) +++ Trunk/pcgen/code/src/java/pcgen/gui/TableColumnManager.java 2006-03-04 07:45:31 UTC (rev 98) @@ -14,7 +14,6 @@ import javax.swing.table.TableColumn; import javax.swing.table.TableColumnModel; -import pcgen.TableColumnManagerModel; public class TableColumnManager implements MouseListener { private JPopupMenu tablePopup; Added: Trunk/pcgen/code/src/java/pcgen/gui/TableColumnManagerModel.java =================================================================== --- Trunk/pcgen/code/src/java/pcgen/gui/TableColumnManagerModel.java (rev 0) +++ Trunk/pcgen/code/src/java/pcgen/gui/TableColumnManagerModel.java 2006-03-04 07:45:31 UTC (rev 98) @@ -0,0 +1,10 @@ +package pcgen.gui; + +import java.util.List; + +public interface TableColumnManagerModel { + public List getMColumnList(); + public boolean isMColumnDisplayed(int col); + public void setMColumnDisplayed(int col, boolean disp); + public int getMColumnOffset(); +} Modified: Trunk/pcgen/code/src/java/pcgen/gui/tabs/spells/InfoKnownSpells.java =================================================================== --- Trunk/pcgen/code/src/java/pcgen/gui/tabs/spells/InfoKnownSpells.java 2006-03-04 07:16:57 UTC (rev 97) +++ Trunk/pcgen/code/src/java/pcgen/gui/tabs/spells/InfoKnownSpells.java 2006-03-04 07:45:31 UTC (rev 98) @@ -25,6 +25,7 @@ import java.awt.BorderLayout; import java.awt.Color; +import java.awt.FlowLayout; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; @@ -524,6 +525,7 @@ // for the availabe spells table and info // JPanel aPanel = new JPanel(); + aPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 1)); aPanel.add(avaLabel); aPanel.add(primaryViewComboBox); aPanel.add(secondaryViewComboBox); @@ -547,6 +549,7 @@ // // Buttons above spellbooks and known spells JPanel sPanel = new JPanel(); + sPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 1)); sPanel.add(selLabel); sPanel.add(primaryViewSelectComboBox); sPanel.add(secondaryViewSelectComboBox); @@ -576,21 +579,15 @@ */ private JPanel buildAddSpellPanel() { - GridBagConstraints c = new GridBagConstraints(); - - JPanel asPanel = new JPanel(new GridBagLayout()); + JPanel asPanel = new JPanel(); + asPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 1)); shouldAutoSpells.setSelected(pc.getAutoSpells()); - c = new GridBagConstraints(); - Utility.buildConstraints(c, 0, 0, 1, 1, 0.0, 0.0); - c.insets = new Insets(2, 2, 2, 2); - asPanel.add(shouldAutoSpells, c); + asPanel.add(shouldAutoSpells); - c = new GridBagConstraints(); - Utility.buildConstraints(c, 3, 0, 1, 1, 0.0, 0.0); - c.insets = new Insets(2, 2, 2, 2); Utility.setDescription(addSpellButton, PropertyFactory.getString("InfoSpells.add.selected")); //$NON-NLS-1$ addSpellButton.setEnabled(false); - asPanel.add(addSpellButton, c); + addSpellButton.setMargin(new Insets(1, 14, 1, 14)); + asPanel.add(addSpellButton); return asPanel; } @@ -603,57 +600,51 @@ private JPanel buildOutputSpellsPanel() { GridBagConstraints c = new GridBagConstraints(); - - // - selectSpellSheetField.setEditable(false); - selectSpellSheetField.setBackground(Color.lightGray); - selectSpellSheetField.setText(SettingsHandler - .getSelectedSpellSheetName()); - selectSpellSheetField.setToolTipText(SettingsHandler - .getSelectedSpellSheetName()); - JPanel ssPanel = new JPanel(new GridBagLayout()); - printHtml = new JButton(); - printHtml.setToolTipText(PropertyFactory - .getString("InfoSpells.print.preview")); //$NON-NLS-1$ - IconUtilitities.maybeSetIcon(printHtml, "PrintPreview16.gif"); //$NON-NLS-1$ - printHtml.setEnabled(true); - - printPdf = new JButton(); - printPdf.setToolTipText(PropertyFactory.getString("InfoSpells.print")); //$NON-NLS-1$ - IconUtilitities.maybeSetIcon(printPdf, "Print16.gif"); //$NON-NLS-1$ - printPdf.setEnabled(true); - c = new GridBagConstraints(); Utility.buildConstraints(c, 0, 0, 1, 1, 0.0, 0.0); - c.insets = new Insets(2, 2, 2, 2); + c.insets = new Insets(1, 2, 1, 2); Utility.setDescription(delSpellButton, PropertyFactory.getString("InfoSpells.remove.selected")); //$NON-NLS-1$ delSpellButton.setEnabled(false); + delSpellButton.setMargin(new Insets(1, 14, 1, 14)); ssPanel.add(delSpellButton, c); c = new GridBagConstraints(); Utility.buildConstraints(c, 1, 0, 1, 1, 0.0, 0.0); - c.insets = new Insets(2, 2, 2, 2); + c.insets = new Insets(1, 2, 1, 2); ssPanel.add(selectSpellSheetButton, c); + selectSpellSheetField.setEditable(false); + selectSpellSheetField.setBackground(Color.lightGray); + selectSpellSheetField.setText(SettingsHandler.getSelectedSpellSheetName()); + selectSpellSheetField.setToolTipText(SettingsHandler.getSelectedSpellSheetName()); c = new GridBagConstraints(); Utility.buildConstraints(c, 2, 0, 1, 1, 1.0, 0.0); - c.insets = new Insets(2, 2, 2, 2); + c.insets = new Insets(1, 2, 1, 2); c.fill = GridBagConstraints.HORIZONTAL; ssPanel.add(selectSpellSheetField, c); + printHtml = new JButton(); + printHtml.setToolTipText(PropertyFactory.getString("InfoSpells.print.preview")); //$NON-NLS-1$ + IconUtilitities.maybeSetIcon(printHtml, "PrintPreview16.gif"); //$NON-NLS-1$ + printHtml.setEnabled(true); c = new GridBagConstraints(); Utility.buildConstraints(c, 3, 0, 1, 1, 0.0, 0.0); - c.insets = new Insets(2, 2, 2, 2); + c.insets = new Insets(1, 2, 1, 2); + printHtml.setMargin(new Insets(1, 14, 1, 14)); ssPanel.add(printHtml, c); + printPdf = new JButton(); + printPdf.setToolTipText(PropertyFactory.getString("InfoSpells.print")); //$NON-NLS-1$ + IconUtilitities.maybeSetIcon(printPdf, "Print16.gif"); //$NON-NLS-1$ + printPdf.setEnabled(true); c = new GridBagConstraints(); Utility.buildConstraints(c, 4, 0, 1, 1, 0.0, 0.0); - c.insets = new Insets(2, 2, 2, 2); + c.insets = new Insets(1, 2, 1, 2); + printPdf.setMargin(new Insets(1, 14, 1, 14)); ssPanel.add(printPdf, c); - return ssPanel; - } + return ssPanel; } /** * Build Bottom Panel. Modified: Trunk/pcgen/code/src/java/pcgen/gui/tabs/spells/InfoPreparedSpells.java =================================================================== --- Trunk/pcgen/code/src/java/pcgen/gui/tabs/spells/InfoPreparedSpells.java 2006-03-04 07:16:57 UTC (rev 97) +++ Trunk/pcgen/code/src/java/pcgen/gui/tabs/spells/InfoPreparedSpells.java 2006-03-04 07:45:31 UTC (rev 98) @@ -25,6 +25,7 @@ import java.awt.BorderLayout; import java.awt.Dimension; +import java.awt.FlowLayout; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; @@ -531,6 +532,7 @@ // JPanel aPanel = new JPanel(); + aPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 1)); aPanel.add(avaLabel); aPanel.add(primaryViewComboBox); aPanel.add(secondaryViewComboBox); @@ -556,6 +558,7 @@ // JPanel sPanel = new JPanel(); + sPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 1)); sPanel.add(selLabel); sPanel.add(primaryViewSelectComboBox); sPanel.add(secondaryViewSelectComboBox); @@ -589,22 +592,25 @@ */ private JPanel buildAddSpellPanel() { - GridBagConstraints c = new GridBagConstraints(); + //GridBagConstraints c = new GridBagConstraints(); - JPanel asPanel = new JPanel(new GridBagLayout()); + JPanel asPanel = new JPanel(); + asPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 1)); + addSpellMMButton = new JButton(addSpellWithMetaMagicTitle); createFeatList(); - c = new GridBagConstraints(); - Utility.buildConstraints(c, 0, 0, 1, 1, 0.0, 0.0); - c.insets = new Insets(2, 2, 2, 2); - asPanel.add(addSpellMMButton, c); + //c = new GridBagConstraints(); + //Utility.buildConstraints(c, 0, 0, 1, 1, 0.0, 0.0); + //c.insets = new Insets(2, 2, 2, 2); + asPanel.add(addSpellMMButton); - c = new GridBagConstraints(); - Utility.buildConstraints(c, 3, 0, 1, 1, 0.0, 0.0); - c.insets = new Insets(2, 2, 2, 2); + //c = new GridBagConstraints(); + //Utility.buildConstraints(c, 3, 0, 1, 1, 0.0, 0.0); + //c.insets = new Insets(2, 2, 2, 2); Utility.setDescription(addSpellButton, PropertyFactory.getString("InfoSpells.add.selected")); //$NON-NLS-1$ addSpellButton.setEnabled(false); - asPanel.add(addSpellButton, c); + addSpellButton.setMargin(new Insets(1, 14, 1, 14)); + asPanel.add(addSpellButton); return asPanel; } @@ -618,20 +624,21 @@ private JPanel buildSpellListPanel() { GridBagConstraints c = new GridBagConstraints(); - c.insets = new Insets(2, 2, 2, 2); c.fill = GridBagConstraints.NONE; - c.anchor = GridBagConstraints.NORTH; + c.anchor = GridBagConstraints.CENTER; JPanel slPanel = new JPanel(new GridBagLayout()); Utility.buildConstraints(c, 0, 0, 1, 1, 0.0, 0.0); + c.insets = new Insets(1, 2, 1, 2); Utility.setDescription(delSpellButton, PropertyFactory.getString("InfoSpells.add.selected")); //$NON-NLS-1$ delSpellButton.setEnabled(false); + delSpellButton.setMargin(new Insets(1, 14, 1, 14)); slPanel.add(delSpellButton, c); - JLabel prepListLabel = new JLabel(PropertyFactory - .getString("InfoPreparedSpells.preparedList")); //$NON-NLS-1$ + JLabel prepListLabel = new JLabel(PropertyFactory.getString("InfoPreparedSpells.preparedList")); //$NON-NLS-1$ Utility.buildConstraints(c, 1, 0, 1, 1, 0.0, 0.0); + c.insets = new Insets(1, 2, 1, 2); slPanel.add(prepListLabel, c); spellBookNameText.setEditable(true); Utility.buildConstraints(c, 2, 0, 1, 1, 1.0, 0.0); @@ -639,16 +646,16 @@ slPanel.add(spellBookNameText, c); addSpellListButton = new JButton(PropertyFactory.getString("InfoSpells.add")); //$NON-NLS-1$ - Utility.setDescription(addSpellListButton, PropertyFactory - .getString("InfoPreparedSpells.add.list")); //$NON-NLS-1$ + Utility.setDescription(addSpellListButton, PropertyFactory.getString("InfoPreparedSpells.add.list")); //$NON-NLS-1$ Utility.buildConstraints(c, 3, 0, 1, 1, 0.0, 0.0); + c.insets = new Insets(1, 2, 1, 2); c.fill = GridBagConstraints.NONE; slPanel.add(addSpellListButton, c); delSpellListButton = new JButton(PropertyFactory.getString("InfoSpells.delete")); //$NON-NLS-1$ - Utility.setDescription(delSpellListButton, PropertyFactory - .getString("InfoPreparedSpells.del.list")); //$NON-NLS-1$ + Utility.setDescription(delSpellListButton, PropertyFactory.getString("InfoPreparedSpells.del.list")); //$NON-NLS-1$ Utility.buildConstraints(c, 4, 0, 1, 1, 0.0, 0.0); + c.insets = new Insets(1, 2, 1, 2); slPanel.add(delSpellListButton, c); return slPanel; Modified: Trunk/pcgen/code/src/java/pcgen/gui/tabs/spells/InfoSpellBooks.java =================================================================== --- Trunk/pcgen/code/src/java/pcgen/gui/tabs/spells/InfoSpellBooks.java 2006-03-04 07:16:57 UTC (rev 97) +++ Trunk/pcgen/code/src/java/pcgen/gui/tabs/spells/InfoSpellBooks.java 2006-03-04 07:45:31 UTC (rev 98) @@ -25,6 +25,7 @@ import java.awt.BorderLayout; import java.awt.Dimension; +import java.awt.FlowLayout; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; @@ -478,12 +479,12 @@ topPane.add(splitPane, BorderLayout.CENTER); JPanel aPanel = new JPanel(); + aPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 1)); aPanel.add(avaLabel); aPanel.add(primaryViewComboBox); aPanel.add(secondaryViewComboBox); - Utility.setDescription(aPanel, PropertyFactory - .getString("InfoSpells.rightclick.add.to.spellbooks")); //$NON-NLS-1$ + Utility.setDescription(aPanel, PropertyFactory.getString("InfoSpells.rightclick.add.to.spellbooks")); //$NON-NLS-1$ leftPane.add(aPanel, BorderLayout.NORTH); JScrollPane scrollPane = new JScrollPane(availableTable, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); @@ -497,14 +498,14 @@ leftPane.add(buildModSpellPanel(addSpellButton, "InfoSpells.add.selected"), BorderLayout.SOUTH); JPanel sPanel = new JPanel(); + sPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 1)); sPanel.add(selLabel); sPanel.add(primaryViewSelectComboBox); sPanel.add(secondaryViewSelectComboBox); rightPane.add(sPanel, BorderLayout.NORTH); scrollPane = new JScrollPane(selectedTable, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); - scrollPane - .setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS); + scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS); selectedTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); selectedTable.setShowHorizontalLines(true); rightPane.add(scrollPane, BorderLayout.CENTER); @@ -525,14 +526,12 @@ */ private JPanel buildModSpellPanel(JButton button, String title) { - GridBagConstraints c = new GridBagConstraints(); - JPanel panel = new JPanel(new GridBagLayout()); - c = new GridBagConstraints(); - Utility.buildConstraints(c, 3, 0, 1, 1, 0.0, 0.0); - c.insets = new Insets(2, 2, 2, 2); + JPanel panel = new JPanel(); + panel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 1)); Utility.setDescription(button, PropertyFactory.getString(title)); //$NON-NLS-1$ button.setEnabled(false); - panel.add(button, c); + button.setMargin(new Insets(1, 14, 1, 14)); + panel.add(button); return panel; } Modified: Trunk/pcgen/code/src/java/pcgen/gui/tabs/spells/SpellModel.java =================================================================== --- Trunk/pcgen/code/src/java/pcgen/gui/tabs/spells/SpellModel.java 2006-03-04 07:16:57 UTC (rev 97) +++ Trunk/pcgen/code/src/java/pcgen/gui/tabs/spells/SpellModel.java 2006-03-04 07:45:31 UTC (rev 98) @@ -28,7 +28,6 @@ import javax.swing.tree.TreePath; -import pcgen.TableColumnManagerModel; import pcgen.core.CharacterDomain; import pcgen.core.Constants; import pcgen.core.Domain; @@ -42,6 +41,7 @@ import pcgen.core.character.SpellInfo; import pcgen.core.spell.Spell; import pcgen.gui.GuiConstants; +import pcgen.gui.TableColumnManagerModel; import pcgen.gui.utils.AbstractTreeTableModel; import pcgen.gui.utils.PObjectNode; import pcgen.gui.utils.TreeTableModel; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |