13 changed files with 0 additions and 373 deletions
-
5prism/src/userinterface/GUIClipboard.java
-
5prism/src/userinterface/GUIFileMenu.java
-
69prism/src/userinterface/GUIGeneralOptions.form
-
183prism/src/userinterface/GUIGeneralOptions.java
-
5prism/src/userinterface/GUIOptionsDialog.java
-
6prism/src/userinterface/GUIPlugin.java
-
3prism/src/userinterface/GUIPrism.java
-
71prism/src/userinterface/OptionsPanel.java
-
6prism/src/userinterface/log/GUILog.java
-
6prism/src/userinterface/model/GUIMultiModel.java
-
2prism/src/userinterface/model/GUITextModelEditorGutter.java
-
6prism/src/userinterface/properties/GUIMultiProperties.java
-
6prism/src/userinterface/simulator/GUISimulator.java
@ -1,69 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8" ?> |
|
||||
|
|
||||
<Form version="1.0" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> |
|
||||
|
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/> |
|
||||
<SubComponents> |
|
||||
<Container class="javax.swing.JPanel" name="jPanel1"> |
|
||||
<Constraints> |
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> |
|
||||
<GridBagConstraints gridX="0" gridY="2" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/> |
|
||||
</Constraint> |
|
||||
</Constraints> |
|
||||
|
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/> |
|
||||
</Container> |
|
||||
<Container class="javax.swing.JPanel" name="jPanel2"> |
|
||||
<Constraints> |
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> |
|
||||
<GridBagConstraints gridX="2" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/> |
|
||||
</Constraint> |
|
||||
</Constraints> |
|
||||
|
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/> |
|
||||
</Container> |
|
||||
<Container class="javax.swing.JPanel" name="jPanel3"> |
|
||||
<Constraints> |
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> |
|
||||
<GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/> |
|
||||
</Constraint> |
|
||||
</Constraints> |
|
||||
|
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/> |
|
||||
</Container> |
|
||||
<Component class="javax.swing.JLabel" name="jLabel1"> |
|
||||
<Properties> |
|
||||
<Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor"> |
|
||||
<ComponentRef name="adjustSlider"/> |
|
||||
</Property> |
|
||||
<Property name="text" type="java.lang.String" value="User interface size:"/> |
|
||||
</Properties> |
|
||||
<Constraints> |
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> |
|
||||
<GridBagConstraints gridX="1" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/> |
|
||||
</Constraint> |
|
||||
</Constraints> |
|
||||
</Component> |
|
||||
<Component class="javax.swing.JSlider" name="adjustSlider"> |
|
||||
<Properties> |
|
||||
<Property name="majorTickSpacing" type="int" value="5"/> |
|
||||
<Property name="maximum" type="int" value="5"/> |
|
||||
<Property name="minimum" type="int" value="-5"/> |
|
||||
<Property name="minorTickSpacing" type="int" value="1"/> |
|
||||
<Property name="paintLabels" type="boolean" value="true"/> |
|
||||
<Property name="paintTicks" type="boolean" value="true"/> |
|
||||
<Property name="snapToTicks" type="boolean" value="true"/> |
|
||||
<Property name="value" type="int" value="0"/> |
|
||||
</Properties> |
|
||||
<AuxValues> |
|
||||
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/> |
|
||||
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="false"/> |
|
||||
</AuxValues> |
|
||||
<Constraints> |
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> |
|
||||
<GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/> |
|
||||
</Constraint> |
|
||||
</Constraints> |
|
||||
</Component> |
|
||||
</SubComponents> |
|
||||
</Form> |
|
||||
@ -1,183 +0,0 @@ |
|||||
//============================================================================== |
|
||||
// |
|
||||
// Copyright (c) 2002- |
|
||||
// Authors: |
|
||||
// * Andrew Hinton <ug60axh@cs.bham.ac.uk> (University of Birmingham) |
|
||||
// * Dave Parker <david.parker@comlab.ox.ac.uk> (University of Oxford, formerly University of Birmingham) |
|
||||
// |
|
||||
//------------------------------------------------------------------------------ |
|
||||
// |
|
||||
// This file is part of PRISM. |
|
||||
// |
|
||||
// PRISM is free software; you can redistribute it and/or modify |
|
||||
// it under the terms of the GNU General Public License as published by |
|
||||
// the Free Software Foundation; either version 2 of the License, or |
|
||||
// (at your option) any later version. |
|
||||
// |
|
||||
// PRISM is distributed in the hope that it will be useful, |
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
||||
// GNU General Public License for more details. |
|
||||
// |
|
||||
// You should have received a copy of the GNU General Public License |
|
||||
// along with PRISM; if not, write to the Free Software Foundation, |
|
||||
// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
||||
// |
|
||||
//============================================================================== |
|
||||
|
|
||||
package userinterface; |
|
||||
|
|
||||
import javax.swing.plaf.metal.*; |
|
||||
import javax.swing.*; |
|
||||
import userinterface.util.*; |
|
||||
import org.w3c.dom.DOMException; |
|
||||
import org.w3c.dom.Document; |
|
||||
import org.w3c.dom.Element; |
|
||||
|
|
||||
import userinterface.OptionsPanel; |
|
||||
|
|
||||
public class GUIGeneralOptions extends OptionsPanel |
|
||||
{ |
|
||||
private GUIPrism gui; |
|
||||
private int last; |
|
||||
private int adjust; |
|
||||
/** Creates new form GUIGeneralOptions */ |
|
||||
public GUIGeneralOptions(GUIPrism gui) |
|
||||
{ |
|
||||
super("General"); |
|
||||
initComponents(); |
|
||||
this.gui = gui; |
|
||||
} |
|
||||
|
|
||||
/** This method is called from within the constructor to |
|
||||
* initialize the form. |
|
||||
* WARNING: Do NOT modify this code. The content of this method is |
|
||||
* always regenerated by the Form Editor. |
|
||||
*/ |
|
||||
private void initComponents()//GEN-BEGIN:initComponents |
|
||||
{ |
|
||||
java.awt.GridBagConstraints gridBagConstraints; |
|
||||
|
|
||||
jPanel1 = new javax.swing.JPanel(); |
|
||||
jPanel2 = new javax.swing.JPanel(); |
|
||||
jPanel3 = new javax.swing.JPanel(); |
|
||||
jLabel1 = new javax.swing.JLabel(); |
|
||||
adjustSlider = new javax.swing.JSlider(); |
|
||||
|
|
||||
setLayout(new java.awt.GridBagLayout()); |
|
||||
|
|
||||
gridBagConstraints = new java.awt.GridBagConstraints(); |
|
||||
gridBagConstraints.gridx = 0; |
|
||||
gridBagConstraints.gridy = 2; |
|
||||
add(jPanel1, gridBagConstraints); |
|
||||
|
|
||||
gridBagConstraints = new java.awt.GridBagConstraints(); |
|
||||
gridBagConstraints.gridx = 2; |
|
||||
gridBagConstraints.gridy = 0; |
|
||||
add(jPanel2, gridBagConstraints); |
|
||||
|
|
||||
gridBagConstraints = new java.awt.GridBagConstraints(); |
|
||||
gridBagConstraints.gridx = 0; |
|
||||
gridBagConstraints.gridy = 0; |
|
||||
add(jPanel3, gridBagConstraints); |
|
||||
|
|
||||
jLabel1.setLabelFor(adjustSlider); |
|
||||
jLabel1.setText("User interface size:"); |
|
||||
gridBagConstraints = new java.awt.GridBagConstraints(); |
|
||||
gridBagConstraints.gridx = 1; |
|
||||
gridBagConstraints.gridy = 1; |
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; |
|
||||
add(jLabel1, gridBagConstraints); |
|
||||
|
|
||||
adjustSlider.setMajorTickSpacing(5); |
|
||||
adjustSlider.setMaximum(5); |
|
||||
adjustSlider.setMinimum(-5); |
|
||||
adjustSlider.setMinorTickSpacing(1); |
|
||||
adjustSlider.setPaintLabels(true); |
|
||||
adjustSlider.setPaintTicks(true); |
|
||||
adjustSlider.setSnapToTicks(true); |
|
||||
adjustSlider.setValue(0); |
|
||||
add(adjustSlider, new java.awt.GridBagConstraints()); |
|
||||
|
|
||||
}//GEN-END:initComponents |
|
||||
|
|
||||
public void apply() |
|
||||
{ |
|
||||
|
|
||||
int adjust = 0; |
|
||||
|
|
||||
adjust = adjustSlider.getValue(); |
|
||||
if(adjust != last) |
|
||||
{ |
|
||||
//System.out.println("adjustment = "+adjust); |
|
||||
try |
|
||||
{ |
|
||||
MetalTheme theme = new PresentationMetalTheme(adjust); |
|
||||
MetalLookAndFeel.setCurrentTheme(theme); |
|
||||
UIManager.setLookAndFeel(UIManager.getLookAndFeel()); |
|
||||
} |
|
||||
catch(Exception e) |
|
||||
{ |
|
||||
//System.out.println("Exception"); |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
SwingUtilities.updateComponentTreeUI(gui); |
|
||||
SwingUtilities.updateComponentTreeUI(gui.getOptions()); |
|
||||
|
|
||||
gui.pack(); |
|
||||
gui.getOptions().pack(); |
|
||||
gui.addNotify(); |
|
||||
last = adjust; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
public void synchronizeGUI() |
|
||||
{ |
|
||||
//not needed |
|
||||
adjust = adjustSlider.getValue(); |
|
||||
last = adjust; |
|
||||
} |
|
||||
|
|
||||
public void defaultGUI() |
|
||||
{ |
|
||||
adjustSlider.setValue(0); |
|
||||
|
|
||||
} |
|
||||
|
|
||||
public boolean valid() throws GUIException |
|
||||
{ |
|
||||
return true; |
|
||||
} |
|
||||
|
|
||||
public Element saveXMLElement(Document doc) throws DOMException |
|
||||
{ |
|
||||
return doc.createElement("dummy"); |
|
||||
} |
|
||||
|
|
||||
public void loadXMLElement(Element element) |
|
||||
{ |
|
||||
} |
|
||||
|
|
||||
public void loadProperties(java.util.Properties properties) |
|
||||
{ |
|
||||
} |
|
||||
|
|
||||
public void loadXMLElement(Document doc, Element element) |
|
||||
{ |
|
||||
} |
|
||||
|
|
||||
public void saveProperties(java.util.Properties properties) |
|
||||
{ |
|
||||
} |
|
||||
|
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables |
|
||||
javax.swing.JSlider adjustSlider; |
|
||||
private javax.swing.JLabel jLabel1; |
|
||||
private javax.swing.JPanel jPanel1; |
|
||||
private javax.swing.JPanel jPanel2; |
|
||||
private javax.swing.JPanel jPanel3; |
|
||||
// End of variables declaration//GEN-END:variables |
|
||||
|
|
||||
|
|
||||
} |
|
||||
@ -1,71 +0,0 @@ |
|||||
//============================================================================== |
|
||||
// |
|
||||
// Copyright (c) 2002- |
|
||||
// Authors: |
|
||||
// * Andrew Hinton <ug60axh@cs.bham.ac.uk> (University of Birmingham) |
|
||||
// * Dave Parker <david.parker@comlab.ox.ac.uk> (University of Oxford, formerly University of Birmingham) |
|
||||
// |
|
||||
//------------------------------------------------------------------------------ |
|
||||
// |
|
||||
// This file is part of PRISM. |
|
||||
// |
|
||||
// PRISM is free software; you can redistribute it and/or modify |
|
||||
// it under the terms of the GNU General Public License as published by |
|
||||
// the Free Software Foundation; either version 2 of the License, or |
|
||||
// (at your option) any later version. |
|
||||
// |
|
||||
// PRISM is distributed in the hope that it will be useful, |
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
||||
// GNU General Public License for more details. |
|
||||
// |
|
||||
// You should have received a copy of the GNU General Public License |
|
||||
// along with PRISM; if not, write to the Free Software Foundation, |
|
||||
// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
||||
// |
|
||||
//============================================================================== |
|
||||
|
|
||||
package userinterface; |
|
||||
|
|
||||
import javax.swing.*; |
|
||||
import prism.*; |
|
||||
|
|
||||
public abstract class OptionsPanel extends JPanel |
|
||||
{ |
|
||||
|
|
||||
private String tab; |
|
||||
|
|
||||
public OptionsPanel(String tab) |
|
||||
{ |
|
||||
this.tab = tab; |
|
||||
} |
|
||||
|
|
||||
//Applies the state of the options panel to the data stored in PrismSettings |
|
||||
public abstract void apply() throws PrismException; |
|
||||
|
|
||||
//Sets up the gui to reflect the data stored in |
|
||||
public abstract void synchronizeGUI(); |
|
||||
|
|
||||
//The following methods are now irrelevent: |
|
||||
// All loading/saving is now done in PrismSettings.java |
|
||||
// Default settings are handled in PrismSettings.java |
|
||||
// and validity is now handled in the apply() method |
|
||||
|
|
||||
//public abstract void defaultGUI(); |
|
||||
|
|
||||
//public abstract boolean valid() throws GUIException; |
|
||||
|
|
||||
//public abstract Element saveXMLElement(Document doc) throws DOMException; |
|
||||
|
|
||||
//public abstract void loadXMLElement(Document doc, Element element); |
|
||||
|
|
||||
//public abstract void saveProperties(Properties properties); |
|
||||
|
|
||||
//public abstract void loadProperties(Properties properties); |
|
||||
|
|
||||
public String getTabText() |
|
||||
{ |
|
||||
return tab; |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue