Getting info since revision: 34845 Getting log for phetcommon...done. Getting log for piccolo-phet...done. Getting log for scala-common...done. Getting log for piccolo2d...done. Getting log for force-law-lab...done. phetcommon ------------------------------------------------------------------------ r35020 | cmalley | 2009-09-15 14:27:24 -0600 (Tue, 15 Sep 2009) | 1 line see #1779, replace deprecated instance calls with getInstance, so we can easily see how many times PhetApplication singleton is being accessed ------------------------------------------------------------------------ r34946 | cmalley | 2009-09-10 15:19:04 -0600 (Thu, 10 Sep 2009) | 1 line see #979, migrate DoubleSpinner to phetcommon ------------------------------------------------------------------------ r34933 | cmalley | 2009-09-10 12:08:10 -0600 (Thu, 10 Sep 2009) | 1 line see #1074, fix piccolo dependencies introduced in Developer menu ------------------------------------------------------------------------ r34912 | cmalley | 2009-09-09 12:12:57 -0600 (Wed, 09 Sep 2009) | 1 line see #1769, remove description from sims ------------------------------------------------------------------------ r34909 | cmalley | 2009-09-09 10:27:45 -0600 (Wed, 09 Sep 2009) | 1 line see #1750, John says that Khmer font issue is resolved so I uncommented the entry in phetcommon-fonts.properties. ------------------------------------------------------------------------ r34908 | cmalley | 2009-09-09 10:25:17 -0600 (Wed, 09 Sep 2009) | 1 line see #1750, comment out Khmer preferred font. It's not certain that it's usable, and we shouldn't be making this preference public. ------------------------------------------------------------------------ r34907 | cmalley | 2009-09-09 10:02:37 -0600 (Wed, 09 Sep 2009) | 1 line see #1680, add locale and preferred font for ar_SA (Arabic, Saudi Arabia) ------------------------------------------------------------------------ r34904 | cmalley | 2009-09-08 23:26:46 -0600 (Tue, 08 Sep 2009) | 19 lines see #1074, moved standard developer menu to phetcommon. All sims will now have a "Developer" menu in the menu bar when program arg "-dev" is specified. The standard menu contains items for setting tab colors and control panel colors. Additional menu items can be added by the client application. affected sims: acid-base-solutions eating-and-exercise glaciers hydrogen-atom natural-selection neuron nuclear-physics optical-tweezers ph-scale sim-example sim-template states-of-matter titration ------------------------------------------------------------------------ r34899 | cmalley | 2009-09-08 11:26:25 -0600 (Tue, 08 Sep 2009) | 18 lines see #1074: developer controls for tab colors - move responsiblilty for creating tabbed module pane to base class - remove inappropriate use of factory pattern for creation of tabbed module pane - affected projects: acid-base-solutions glaciers eating-and-excercise natural-selection neuron nuclear-physics optical-tweezers quantum-wave-interference sim-example sim-template states-of-matter titration ------------------------------------------------------------------------ piccolo-phet ------------------------------------------------------------------------ r35020 | cmalley | 2009-09-15 14:27:24 -0600 (Tue, 15 Sep 2009) | 1 line see #1779, replace deprecated instance calls with getInstance, so we can easily see how many times PhetApplication singleton is being accessed ------------------------------------------------------------------------ r35004 | cmalley | 2009-09-14 12:16:47 -0600 (Mon, 14 Sep 2009) | 1 line organize imports ------------------------------------------------------------------------ r34936 | samreid | 2009-09-10 12:29:27 -0600 (Thu, 10 Sep 2009) | 1 line see #1074, remove casts by requiring PiccoloPhetApplication to use a TabbedModulePanePiccolo ------------------------------------------------------------------------ r34933 | cmalley | 2009-09-10 12:08:10 -0600 (Thu, 10 Sep 2009) | 1 line see #1074, fix piccolo dependencies introduced in Developer menu ------------------------------------------------------------------------ r34917 | cmalley | 2009-09-09 12:52:23 -0600 (Wed, 09 Sep 2009) | 1 line see #1771. Cleaned up -build.properties files. Deleted project.name, project.screenshot, and project.*.screenshot. ------------------------------------------------------------------------ r34912 | cmalley | 2009-09-09 12:12:57 -0600 (Wed, 09 Sep 2009) | 1 line see #1769, remove description from sims ------------------------------------------------------------------------ r34904 | cmalley | 2009-09-08 23:26:46 -0600 (Tue, 08 Sep 2009) | 19 lines see #1074, moved standard developer menu to phetcommon. All sims will now have a "Developer" menu in the menu bar when program arg "-dev" is specified. The standard menu contains items for setting tab colors and control panel colors. Additional menu items can be added by the client application. affected sims: acid-base-solutions eating-and-exercise glaciers hydrogen-atom natural-selection neuron nuclear-physics optical-tweezers ph-scale sim-example sim-template states-of-matter titration ------------------------------------------------------------------------ r34899 | cmalley | 2009-09-08 11:26:25 -0600 (Tue, 08 Sep 2009) | 18 lines see #1074: developer controls for tab colors - move responsiblilty for creating tabbed module pane to base class - remove inappropriate use of factory pattern for creation of tabbed module pane - affected projects: acid-base-solutions glaciers eating-and-excercise natural-selection neuron nuclear-physics optical-tweezers quantum-wave-interference sim-example sim-template states-of-matter titration ------------------------------------------------------------------------ scala-common ------------------------------------------------------------------------ r35093 | samreid | 2009-09-17 09:48:50 -0600 (Thu, 17 Sep 2009) | 1 line convert imports to absolute (for compatibility with 2.8) ------------------------------------------------------------------------ piccolo2d ------------------------------------------------------------------------ r34917 | cmalley | 2009-09-09 12:52:23 -0600 (Wed, 09 Sep 2009) | 1 line see #1771. Cleaned up -build.properties files. Deleted project.name, project.screenshot, and project.*.screenshot. ------------------------------------------------------------------------ force-law-lab ------------------------------------------------------------------------ r34912 | cmalley | 2009-09-09 12:12:57 -0600 (Wed, 09 Sep 2009) | 1 line see #1769, remove description from sims ------------------------------------------------------------------------ Getting info since revision: 34845 Getting diff for phetcommon...done. Getting diff for piccolo-phet...done. Getting diff for scala-common...done. Getting diff for piccolo2d...done. Getting diff for force-law-lab...done. phetcommon Index: src/edu/colorado/phet/common/phetcommon/dialogs/PhetAboutDialog.java =================================================================== --- src/edu/colorado/phet/common/phetcommon/dialogs/PhetAboutDialog.java (revision 35097) +++ src/edu/colorado/phet/common/phetcommon/dialogs/PhetAboutDialog.java (revision 34845) @@ -50,9 +50,10 @@ private static final String OS_VERSION = PhetCommonResources.getString( "Common.About.OSVersion" ); private static final String CREDITS_BUTTON = PhetCommonResources.getString( "Common.About.CreditsButton" ); private static final String CLOSE_BUTTON = PhetCommonResources.getString( "Common.choice.close" ); - - private final ISimInfo config; + private String titleString, descriptionString, versionString, buildDate, distributionTag; + private ISimInfo config; + /** * Constructs the dialog. * @@ -72,14 +73,22 @@ protected PhetAboutDialog( Frame owner, ISimInfo config ) { super( owner ); setResizable( false ); - - this.config = config; + this.config=config; - String titleString = config.getName(); + titleString = config.getName(); + descriptionString = config.getDescription(); + if ( descriptionString == null ) { + new Exception( "null description string, continuing" ).printStackTrace(); + descriptionString = ""; + } + versionString = config.getVersion().formatForAboutDialog(); + buildDate = config.getVersion().formatTimestamp(); + distributionTag = config.getDistributionTag(); + setTitle( TITLE + " " + titleString ); JPanel logoPanel = createLogoPanel(); - JPanel infoPanel = createInfoPanel( config ); + JPanel infoPanel = createInfoPanel(); JPanel buttonPanel = createButtonPanel( config.isStatisticsFeatureIncluded() ); VerticalLayoutPanel contentPanel = new VerticalLayoutPanel(); @@ -125,12 +134,7 @@ /* * Creates the panel that displays info specific to the simulation. */ - private JPanel createInfoPanel( ISimInfo config ) { - - String titleString = config.getName(); - String versionString = config.getVersion().formatForAboutDialog(); - String buildDate = config.getVersion().formatTimestamp(); - String distributionTag = config.getDistributionTag(); + private JPanel createInfoPanel() { VerticalLayoutPanel infoPanel = new VerticalLayoutPanel(); @@ -139,6 +143,23 @@ Font f = titleLabel.getFont(); titleLabel.setFont( new Font( f.getFontName(), Font.BOLD, f.getSize() ) ); + // Simulation description + JTextArea descriptionTextArea = new JTextArea( descriptionString ); + FontMetrics fontMetrics = descriptionTextArea.getFontMetrics( descriptionTextArea.getFont() ); + final int columns = 35; + descriptionTextArea.setColumns( columns ); + + // Swing's notion of a text "column" is weakly defined. Short of implementing our own word wrapping, + // using FontMetrics provides the closest approximation to the number of rows that we need. + // Since we want a bit of space between the description and the stuff below it, having an + // extra (blank) row is generally OK. + int rows = ( ( fontMetrics.stringWidth( descriptionString ) / fontMetrics.charWidth( 'm' ) ) / columns ) + 2; + descriptionTextArea.setRows( rows ); + descriptionTextArea.setBackground( infoPanel.getBackground() ); + descriptionTextArea.setEditable( false ); + descriptionTextArea.setLineWrap( true ); + descriptionTextArea.setWrapStyleWord( true ); + // Simulation version JLabel versionLabel = new JLabel( SIM_VERSION + " " + versionString ); @@ -166,6 +187,10 @@ infoPanel.add( Box.createVerticalStrut( ySpacing ) ); infoPanel.add( titleLabel ); infoPanel.add( Box.createVerticalStrut( ySpacing ) ); + infoPanel.add( descriptionTextArea ); + infoPanel.add( Box.createVerticalStrut( ySpacing ) ); + infoPanel.add( new JSeparator()); + infoPanel.add( Box.createVerticalStrut( ySpacing ) ); infoPanel.add( versionLabel ); infoPanel.add( buildDateLabel ); if ( distributionTagLabel != null ) { Index: src/edu/colorado/phet/common/phetcommon/application/PhetApplicationConfig.java =================================================================== --- src/edu/colorado/phet/common/phetcommon/application/PhetApplicationConfig.java (revision 35097) +++ src/edu/colorado/phet/common/phetcommon/application/PhetApplicationConfig.java (revision 34845) @@ -148,6 +148,15 @@ return resourceLoader.getName( flavor ); } + /** + * Gets the localized simulation description. + * + * @return description + */ + public String getDescription() { + return resourceLoader.getDescription( flavor ); + } + public String getVersionForTitleBar() { return getVersion().formatForTitleBar(); } Index: src/edu/colorado/phet/common/phetcommon/application/ISimInfo.java =================================================================== --- src/edu/colorado/phet/common/phetcommon/application/ISimInfo.java (revision 35097) +++ src/edu/colorado/phet/common/phetcommon/application/ISimInfo.java (revision 34845) @@ -7,6 +7,7 @@ public interface ISimInfo { String getName(); + String getDescription(); PhetVersion getVersion(); /** Index: src/edu/colorado/phet/common/phetcommon/application/PhetApplication.java =================================================================== --- src/edu/colorado/phet/common/phetcommon/application/PhetApplication.java (revision 35097) +++ src/edu/colorado/phet/common/phetcommon/application/PhetApplication.java (revision 34845) @@ -25,13 +25,13 @@ //---------------------------------------------------------------- public static final String DEVELOPER_CONTROLS_COMMAND_LINE_ARG = "-dev";//Command line argument to enable developer-only features - private static ArrayList phetApplications = new ArrayList(); + private static ArrayList phetApplications = new ArrayList(); //---------------------------------------------------------------- // Instance data //---------------------------------------------------------------- - private ITabbedModulePane tabbedModulePane; + private TabbedPaneType tabbedPaneType; private PhetApplicationConfig phetApplicationConfig; private PhetFrame phetFrame; @@ -44,12 +44,12 @@ //---------------------------------------------------------------- public PhetApplication( PhetApplicationConfig config ) { - this( config, new JTabbedModulePane() ); + this( config, JTABBED_PANE_TYPE ); } - protected PhetApplication( PhetApplicationConfig phetApplicationConfig, ITabbedModulePane tabbedPane ) { + protected PhetApplication( PhetApplicationConfig phetApplicationConfig, TabbedPaneType tabbedPaneType ) { this.phetApplicationConfig = phetApplicationConfig; - this.tabbedModulePane = tabbedPane; + this.tabbedPaneType = tabbedPaneType; this.moduleManager = new ModuleManager( this ); phetFrame = createPhetFrame(); @@ -64,10 +64,6 @@ //---------------------------------------------------------------- // //---------------------------------------------------------------- - - public ITabbedModulePane getTabbedModulePane() { - return tabbedModulePane; - } /** * Are developer controls enabled? @@ -93,6 +89,16 @@ } /** + * Get the last created PhetApplication. + * + * @return last created PhetApplication. + * @deprecated use getInstance + */ + public static PhetApplication instance() { + return getInstance(); + } + + /** * Creates the PhetFrame for the application *

* Concrete subclasses implement this @@ -180,6 +186,15 @@ //---------------------------------------------------------------- /** + * Creates the tabbed pane for the modules in the application. + * + * @return a tabbed module pane + */ + public ITabbedModulePane createTabbedPane() { + return tabbedPaneType.createTabbedPane(); + } + + /** * Sets the modules in the application * * @param modules @@ -357,7 +372,29 @@ } } + public void setTabbedPaneType( TabbedPaneType tabbedPaneType ) { + this.tabbedPaneType = tabbedPaneType; + } + /** + * Enumeration class used to specify the type of tabbed panes the application is to use in + * its Module instances + */ + public abstract static class TabbedPaneType { + protected TabbedPaneType() { + } + + public abstract ITabbedModulePane createTabbedPane(); + } + + // Standard Swing JTabbedPanes + public static final TabbedPaneType JTABBED_PANE_TYPE = new TabbedPaneType() { + public ITabbedModulePane createTabbedPane() { + return new JTabbedModulePane(); + } + }; + + /** * Saves the simulation's configuration. * Default implementation does nothing, subclasses should override. */ Index: src/edu/colorado/phet/common/phetcommon/application/Module.java =================================================================== --- src/edu/colorado/phet/common/phetcommon/application/Module.java (revision 35097) +++ src/edu/colorado/phet/common/phetcommon/application/Module.java (revision 34845) @@ -541,43 +541,31 @@ public void updateGraphics( ClockEvent event ) { } + public void setClockControlPanelBackground( Color color ) { + Class[] excludedClasses = { JTextComponent.class }; // default excluded classes, what we want in most cases + setClockControlPanelBackground( color, excludedClasses ); + } + public void setControlPanelBackground( Color color ) { - if ( getControlPanel() != null ) { - Class[] excludedClasses = { JTextComponent.class }; // default excluded classes, what we want in most cases - setControlPanelBackground( color, excludedClasses ); - } + Class[] excludedClasses = { JTextComponent.class }; // default excluded classes, what we want in most cases + setControlPanelBackground( color, excludedClasses ); } public void setControlPanelBackground( Color color, Class[] excludedClasses ) { - if ( getControlPanel() != null ) { - SwingUtils.setBackgroundDeep( getControlPanel(), color, excludedClasses, false /* processContentsOfExcludedContainers */); - } + SwingUtils.setBackgroundDeep( getControlPanel(), color, excludedClasses, false /* processContentsOfExcludedContainers */ ); } - public void setClockControlPanelBackground( Color color ) { - if ( getClockControlPanel() != null ) { - Class[] excludedClasses = { JTextComponent.class }; // default excluded classes, what we want in most cases - setClockControlPanelBackground( color, excludedClasses ); - } - } - public void setClockControlPanelBackground( Color color, Class[] excludedClasses ) { - if ( getClockControlPanel() != null ) { - SwingUtils.setBackgroundDeep( getClockControlPanel(), color, excludedClasses, false /* processContentsOfExcludedContainers */); - } + SwingUtils.setBackgroundDeep( getClockControlPanel(), color, excludedClasses, false /* processContentsOfExcludedContainers */ ); } public void setHelpPanelBackground( Color color ) { - if ( getHelpPanel() != null ) { - Class[] excludedClasses = { JTextComponent.class }; // default excluded classes, what we want in most cases - setHelpPanelBackground( color, excludedClasses ); - } + Class[] excludedClasses = { JTextComponent.class }; // default excluded classes, what we want in most cases + setHelpPanelBackground( color, excludedClasses ); } public void setHelpPanelBackground( Color color, Class[] excludedClasses ) { - if ( getHelpPanel() != null ) { - SwingUtils.setBackgroundDeep( getHelpPanel(), color, excludedClasses, false /* processContentsOfExcludedContainers */); - } + SwingUtils.setBackgroundDeep( getHelpPanel(), color, excludedClasses, false /* processContentsOfExcludedContainers */ ); } //---------------------------------------------------------------------------- Index: src/edu/colorado/phet/common/phetcommon/resources/PhetResources.java =================================================================== --- src/edu/colorado/phet/common/phetcommon/resources/PhetResources.java (revision 35097) +++ src/edu/colorado/phet/common/phetcommon/resources/PhetResources.java (revision 34845) @@ -46,6 +46,7 @@ // Standard localized properties: private static final String PROPERTY_NAME = "name"; + private static final String PROPERTY_DESCRIPTION = "description"; // Standard non-localized properties: public static final String PROPERTY_VERSION_MAJOR = "version.major"; @@ -316,6 +317,13 @@ } /** + * Gets the localized description of the sim (required property). + */ + public String getDescription( String flavor ) { + return localizedProperties.getProperty( flavor + "." + PROPERTY_DESCRIPTION ); + } + + /** * Gets the object that encapsulates the project's version information. * Involves using a number of required project properties. * TODO: remove duplicate implementation in PhetProject Index: src/edu/colorado/phet/common/phetcommon/view/ControlPanel.java =================================================================== --- src/edu/colorado/phet/common/phetcommon/view/ControlPanel.java (revision 35097) +++ src/edu/colorado/phet/common/phetcommon/view/ControlPanel.java (revision 34845) @@ -236,7 +236,7 @@ * @param resettables */ public JButton addResetAllButton( final Resettable[] resettables ) { - JButton resetAllButton = new ResetAllButton( resettables, PhetApplication.getInstance().getPhetFrame() ); + JButton resetAllButton = new ResetAllButton( resettables, PhetApplication.instance().getPhetFrame() ); addControl( resetAllButton ); return resetAllButton; } Index: src/edu/colorado/phet/common/phetcommon/view/HelpPanel.java =================================================================== --- src/edu/colorado/phet/common/phetcommon/view/HelpPanel.java (revision 35097) +++ src/edu/colorado/phet/common/phetcommon/view/HelpPanel.java (revision 34845) @@ -61,7 +61,7 @@ } module.setHelpEnabled( miniHelpShowing ); // Synchronize the Help menu item. - PhetApplication.getInstance().getPhetFrame().getHelpMenu().setHelpSelected( miniHelpShowing ); + PhetApplication.instance().getPhetFrame().getHelpMenu().setHelpSelected( miniHelpShowing ); } } ); megaHelpBtn.addActionListener( new ActionListener() { Index: src/edu/colorado/phet/common/phetcommon/view/PhetFrame.java =================================================================== --- src/edu/colorado/phet/common/phetcommon/view/PhetFrame.java (revision 35097) +++ src/edu/colorado/phet/common/phetcommon/view/PhetFrame.java (revision 34845) @@ -11,7 +11,6 @@ import edu.colorado.phet.common.phetcommon.application.*; import edu.colorado.phet.common.phetcommon.preferences.PhetPreferences; import edu.colorado.phet.common.phetcommon.resources.PhetCommonResources; -import edu.colorado.phet.common.phetcommon.view.menu.DeveloperMenu; import edu.colorado.phet.common.phetcommon.view.menu.HelpMenu; import edu.colorado.phet.common.phetcommon.view.menu.PhetFileMenu; import edu.colorado.phet.common.phetcommon.view.util.SwingUtils; @@ -23,15 +22,12 @@ * @version $Revision:14677 $ */ public class PhetFrame extends JFrame { - + private HelpMenu helpMenu; + private JMenu defaultFileMenu; private PhetApplication application; private Container contentPanel; private Module lastAdded; - - private JMenu defaultFileMenu; - private JMenu developerMenu; - private HelpMenu helpMenu; - + /** * Constructs a PhetFrame for the specified PhetApplication. * @@ -59,20 +55,12 @@ } } ); - // menu bar JMenuBar menuBar = new JMenuBar(); - setJMenuBar( menuBar ); - // File menu + this.helpMenu = new HelpMenu( application ); defaultFileMenu = new PhetFileMenu( this, application.getSimInfo() ); menuBar.add( defaultFileMenu ); - // Developer menu - developerMenu = new DeveloperMenu( application ); - if ( application.isDeveloperControlsEnabled() ) { - menuBar.add( developerMenu ); - } - // Help menu - helpMenu = new HelpMenu( application ); menuBar.add( helpMenu ); + setJMenuBar( menuBar ); application.addModuleObserver( new ModuleObserver() { public void moduleAdded( ModuleEvent event ) { @@ -148,7 +136,7 @@ return module.getModulePanel(); } else if ( contentPanel instanceof ModulePanel ) { - ITabbedModulePane tabbedModulePane = application.getTabbedModulePane(); + ITabbedModulePane tabbedModulePane = application.createTabbedPane(); tabbedModulePane.init( application, new Module[]{lastAdded, module} ); return tabbedModulePane.getComponent(); } @@ -311,10 +299,6 @@ } return null; } - - public JMenu getDeveloperMenu() { - return developerMenu; - } /** * Gets the HelpMenu for this PhetFrame. Index: src/edu/colorado/phet/common/phetcommon/view/controls/DoubleSpinner.java =================================================================== --- src/edu/colorado/phet/common/phetcommon/view/controls/DoubleSpinner.java (revision 35097) +++ src/edu/colorado/phet/common/phetcommon/view/controls/DoubleSpinner.java (revision 34845) @@ -1,68 +0,0 @@ -/* Copyright 2006-2009, University of Colorado */ - -package edu.colorado.phet.common.phetcommon.view.controls; - -import java.awt.Dimension; -import java.awt.event.FocusEvent; -import java.awt.event.FocusListener; - -import javax.swing.JFormattedTextField; -import javax.swing.JSpinner; -import javax.swing.SpinnerNumberModel; -import javax.swing.SwingUtilities; - - -/* - * DoubleSpinner is a spinner that contains a double precision value. - * - * @author Chris Malley (cmalley@pixelzoom.com) - */ -public class DoubleSpinner extends JSpinner implements FocusListener { - - private JFormattedTextField textField; - - public DoubleSpinner( double value, double min, double max, double step, String format, Dimension size ) { - super(); - - // model - SpinnerNumberModel model = new SpinnerNumberModel( value, min, max, step ); - setModel( model ); - // editor - NumberEditor numberEditor = new NumberEditor( this, format ); - setEditor( numberEditor ); - textField = numberEditor.getTextField(); - textField.addFocusListener( this ); - // size - setPreferredSize( size ); - setMinimumSize( size ); - } - - public double getDoubleValue() { - return ( (Double) getValue() ).doubleValue(); - } - - public void setDoubleValue( double value ) { - setValue( new Double( value ) ); - } - - public JFormattedTextField getFormattedTextField() { - return textField; - } - - /* - * When the spinner gains focus, select its contents. - *

- * NOTE: - * This currently does not work; see Bug ID 4699955 at bugs.sun.com - * A workaround is to call selectAll in invokeLater. - */ - public void focusGained( FocusEvent e ) { - SwingUtilities.invokeLater( new Runnable() { - public void run() { - textField.selectAll(); - } - } ); - } - - public void focusLost( FocusEvent e ) {} -} Index: src/edu/colorado/phet/common/phetcommon/view/menu/ControlPanelPropertiesMenuItem.java =================================================================== --- src/edu/colorado/phet/common/phetcommon/view/menu/ControlPanelPropertiesMenuItem.java (revision 35097) +++ src/edu/colorado/phet/common/phetcommon/view/menu/ControlPanelPropertiesMenuItem.java (revision 34845) @@ -1,58 +0,0 @@ -package edu.colorado.phet.common.phetcommon.view.menu; - -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; - -import javax.swing.JCheckBoxMenuItem; -import javax.swing.JDialog; - -import edu.colorado.phet.common.phetcommon.application.PhetApplication; - -/** - * Menu item that provides access to controls for properties related to a Module's standard control panels. - * This menu item is intended to be added to the Developer menu, and is therefore not internationalized. - * - * @author Chris Malley (cmalley@pixelzoom.com) - */ -public class ControlPanelPropertiesMenuItem extends JCheckBoxMenuItem { - - private static final String ITEM_LABEL = "Control Panel properties..."; // developer control, i18n not required - - private JDialog dialog; - - public ControlPanelPropertiesMenuItem( final PhetApplication app ) { - super( ITEM_LABEL ); - addActionListener( new ActionListener() { - public void actionPerformed( ActionEvent event ) { - handleAction( app ); - } - } ); - } - - private void handleAction( PhetApplication app ) { - if ( isSelected() ) { - dialog = new ControlPanelPropertiesDialog( app ); - dialog.setVisible( true ); - dialog.addWindowListener( new WindowAdapter() { - - public void windowClosed( WindowEvent e ) { - cleanup(); - } - - public void windowClosing( WindowEvent e ) { - cleanup(); - } - - private void cleanup() { - setSelected( false ); - dialog = null; - } - } ); - } - else { - dialog.dispose(); - } - } -} Index: src/edu/colorado/phet/common/phetcommon/view/menu/DeveloperMenu.java =================================================================== --- src/edu/colorado/phet/common/phetcommon/view/menu/DeveloperMenu.java (revision 35097) +++ src/edu/colorado/phet/common/phetcommon/view/menu/DeveloperMenu.java (revision 34845) @@ -1,20 +0,0 @@ -package edu.colorado.phet.common.phetcommon.view.menu; - - -import javax.swing.JMenu; - -import edu.colorado.phet.common.phetcommon.application.PhetApplication; - -/** - * DeveloperMenu is the "Developer" menu that appears in the menu bar. - * This menu contains global developer-only features for tuning and debugging. - * - * @author Chris Malley (cmalley@pixelzoom.com) - */ -public class DeveloperMenu extends JMenu { - - public DeveloperMenu( PhetApplication app ) { - super( "Developer" ); - add( new ControlPanelPropertiesMenuItem( app ) ); - } -} Index: src/edu/colorado/phet/common/phetcommon/view/menu/ControlPanelPropertiesDialog.java =================================================================== --- src/edu/colorado/phet/common/phetcommon/view/menu/ControlPanelPropertiesDialog.java (revision 35097) +++ src/edu/colorado/phet/common/phetcommon/view/menu/ControlPanelPropertiesDialog.java (revision 34845) @@ -1,68 +0,0 @@ -package edu.colorado.phet.common.phetcommon.view.menu; - -import java.awt.Color; - -import javax.swing.JPanel; -import javax.swing.border.EmptyBorder; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; - -import edu.colorado.phet.common.phetcommon.application.Module; -import edu.colorado.phet.common.phetcommon.application.PaintImmediateDialog; -import edu.colorado.phet.common.phetcommon.application.PhetApplication; -import edu.colorado.phet.common.phetcommon.view.controls.ColorControl; -import edu.colorado.phet.common.phetcommon.view.util.SwingUtils; - -/** - * Controls for properties related to a Module's standard control panels. - * These are developer controls and are therefore not internationalized. - * - * @author Chris Malley (cmalley@pixelzoom.com) - */ -public class ControlPanelPropertiesDialog extends PaintImmediateDialog { - - private PhetApplication app; - private final ColorControl colorControl; - - public ControlPanelPropertiesDialog( PhetApplication app ) { - super( app.getPhetFrame() ); - setTitle( "Control Panel properties" ); - - this.app = app; - - colorControl = new ColorControl( app.getPhetFrame(), "background color: ", Color.WHITE ); - colorControl.addChangeListener( new ChangeListener() { - public void stateChanged( ChangeEvent event ) { - setControlPanelBackground( colorControl.getColor() ); - } - } ); - - JPanel panel = new JPanel(); - panel.setBorder( new EmptyBorder( 5, 5, 5, 5 ) ); - panel.add( colorControl ); - - setContentPane( panel ); - pack(); - SwingUtils.centerDialogInParent( this ); - } - - @Override - public void setVisible( boolean visible ) { - if ( app.getModules().length > 0 ) { - Module module = app.getModule( 0 ); - if ( module.getControlPanel() != null ) { - colorControl.setColor( module.getControlPanel().getBackground() ); - } - } - super.setVisible( visible ); - } - - private void setControlPanelBackground( Color color ) { - Module[] modules = app.getModules(); - for ( int i = 0; i < modules.length; i++ ) { - modules[i].setControlPanelBackground( color ); - modules[i].setClockControlPanelBackground( color ); - modules[i].setHelpPanelBackground( color ); - } - } -} Index: data/phetcommon/localization/phetcommon-fonts.properties =================================================================== --- data/phetcommon/localization/phetcommon-fonts.properties (revision 35097) +++ data/phetcommon/localization/phetcommon-fonts.properties (revision 34845) @@ -1,7 +1,6 @@ # Preferred physical font names for various languages, comma separated (no whitespace!), ordered by decreasing preference. preferredFonts.ja=MS Mincho,MS Gothic,Osaka preferredFonts.ar=Lucida Sans Regular -preferredFonts.ar_SA=Lucida Sans Regular preferredFonts.zh=SimSun,NSimSun,SimHei,PMingLiU,MingLiU preferredFonts.zh_CN=SimSun,NSimSun,SimHei,PMingLiU,MingLiU preferredFonts.zh_TW=SimSun,NSimSun,SimHei,PMingLiU,MingLiU piccolo-phet Index: src/edu/colorado/phet/common/piccolophet/TabbedPanePropertiesMenuItem.java =================================================================== --- src/edu/colorado/phet/common/piccolophet/TabbedPanePropertiesMenuItem.java (revision 35097) +++ src/edu/colorado/phet/common/piccolophet/TabbedPanePropertiesMenuItem.java (revision 34845) @@ -1,57 +0,0 @@ -package edu.colorado.phet.common.piccolophet; - -import java.awt.Frame; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; - -import javax.swing.JCheckBoxMenuItem; -import javax.swing.JDialog; - -/** - * Menu item that provides access to controls for properties related to a Piccolo-based tabbed pane. - * This menu item is intended to be added to the Developer menu, and is therefore not internationalized. - * - * @author Chris Malley (cmalley@pixelzoom.com) - */ -public class TabbedPanePropertiesMenuItem extends JCheckBoxMenuItem { - - private static final String ITEM_LABEL = "Tabbed Pane properties..."; // developer control, i18n not required - - private JDialog dialog; - - public TabbedPanePropertiesMenuItem( final Frame owner, final PhetTabbedPane tabbedPane ) { - super( ITEM_LABEL ); - addActionListener( new ActionListener() { - public void actionPerformed( ActionEvent event ) { - handleAction( owner, tabbedPane ); - } - } ); - } - - private void handleAction( final Frame owner, final PhetTabbedPane tabbedPane ) { - if ( isSelected() ) { - dialog = new TabbedPanePropertiesDialog( owner, tabbedPane ); - dialog.setVisible( true ); - dialog.addWindowListener( new WindowAdapter() { - - public void windowClosed( WindowEvent e ) { - cleanup(); - } - - public void windowClosing( WindowEvent e ) { - cleanup(); - } - - private void cleanup() { - setSelected( false ); - dialog = null; - } - } ); - } - else { - dialog.dispose(); - } - } -} Index: src/edu/colorado/phet/common/piccolophet/test/help/TestHelpBalloon.java =================================================================== --- src/edu/colorado/phet/common/piccolophet/test/help/TestHelpBalloon.java (revision 35097) +++ src/edu/colorado/phet/common/piccolophet/test/help/TestHelpBalloon.java (revision 34845) @@ -418,7 +418,7 @@ } public JFrame getFrame() { - return PhetApplication.getInstance().getPhetFrame(); + return PhetApplication.instance().getPhetFrame(); } } Index: src/edu/colorado/phet/common/piccolophet/test/help/TestGlassPaneCanvas.java =================================================================== --- src/edu/colorado/phet/common/piccolophet/test/help/TestGlassPaneCanvas.java (revision 35097) +++ src/edu/colorado/phet/common/piccolophet/test/help/TestGlassPaneCanvas.java (revision 34845) @@ -239,7 +239,7 @@ // Help (glass pane) ----------------------------------- - JFrame frame = PhetApplication.getInstance().getPhetFrame(); + JFrame frame = PhetApplication.instance().getPhetFrame(); JComponent glassPane = new MyGlassPane( frame ); setHelpPane( glassPane ); } @@ -348,7 +348,7 @@ } private void showMessage( String message ) { - JOptionPane.showMessageDialog( PhetApplication.getInstance().getPhetFrame(), message ); + JOptionPane.showMessageDialog( PhetApplication.instance().getPhetFrame(), message ); } } } Index: src/edu/colorado/phet/common/piccolophet/TabbedPanePropertiesDialog.java =================================================================== --- src/edu/colorado/phet/common/piccolophet/TabbedPanePropertiesDialog.java (revision 35097) +++ src/edu/colorado/phet/common/piccolophet/TabbedPanePropertiesDialog.java (revision 34845) @@ -6,31 +6,33 @@ import java.awt.Frame; import java.awt.Insets; +import javax.swing.JDialog; import javax.swing.JPanel; import javax.swing.border.EmptyBorder; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; -import edu.colorado.phet.common.phetcommon.application.PaintImmediateDialog; +import edu.colorado.phet.common.phetcommon.application.PhetApplication; import edu.colorado.phet.common.phetcommon.view.VerticalLayoutPanel; import edu.colorado.phet.common.phetcommon.view.controls.ColorControl; import edu.colorado.phet.common.phetcommon.view.util.EasyGridBagLayout; import edu.colorado.phet.common.phetcommon.view.util.SwingUtils; /** - * Developer controls for the properties of PhetTabbedPane. - * These are developer controls and are therefore not internationalized. + * TabPropertiesDialog is a dialog that contains developer controls for + * the properties of PhetTabbedPane. + * These controls will not be available to the user, and are not localized. * * @author Chris Malley (cmalley@pixelzoom.com) */ -public class TabbedPanePropertiesDialog extends PaintImmediateDialog { +public class TabbedPanePropertiesDialog extends JDialog { - public TabbedPanePropertiesDialog( final Frame parent, PhetTabbedPane tabbedPane ) { - super( parent, "Tabbed Pane properties" ); + public TabbedPanePropertiesDialog( Frame owner, PhetTabbedPane tabbedPane ) { + super( owner, "Tabbed Pane properties" ); setResizable( false ); setModal( false ); - JPanel inputPanel = createInputPanel( parent, tabbedPane ); + JPanel inputPanel = createInputPanel( tabbedPane ); VerticalLayoutPanel panel = new VerticalLayoutPanel(); panel.setFillHorizontal(); @@ -41,11 +43,13 @@ SwingUtils.centerDialogInParent( this ); } - private JPanel createInputPanel( Frame parent, final PhetTabbedPane tabbedPane ) { + private JPanel createInputPanel( final PhetTabbedPane tabbedPane ) { + Frame parentFrame = PhetApplication.instance().getPhetFrame(); + // background color Color backgroundColor = tabbedPane.getBackground(); - final ColorControl backgroundColorControl = new ColorControl( parent, "background color: ", backgroundColor ); + final ColorControl backgroundColorControl = new ColorControl( parentFrame, "background color: ", backgroundColor ); backgroundColorControl.addChangeListener( new ChangeListener() { public void stateChanged( ChangeEvent event ) { tabbedPane.setBackground( backgroundColorControl.getColor() ); @@ -54,7 +58,7 @@ // selected tab color Color selectedTabColor = tabbedPane.getSelectedTabColor(); - final ColorControl selectedTabColorControl = new ColorControl( parent, "tab color (selected): ", selectedTabColor ); + final ColorControl selectedTabColorControl = new ColorControl( parentFrame, "tab color (selected): ", selectedTabColor ); selectedTabColorControl.addChangeListener( new ChangeListener() { public void stateChanged( ChangeEvent event ) { tabbedPane.setSelectedTabColor( selectedTabColorControl.getColor() ); @@ -63,7 +67,7 @@ // unselected tab color Color unselectedTabColor = tabbedPane.getUnselectedTabColor(); - final ColorControl unselectedTabColorControl = new ColorControl( parent, "tab color (unselected): ", unselectedTabColor ); + final ColorControl unselectedTabColorControl = new ColorControl( parentFrame, "tab color (unselected): ", unselectedTabColor ); unselectedTabColorControl.addChangeListener( new ChangeListener() { public void stateChanged( ChangeEvent event ) { tabbedPane.setUnselectedTabColor( unselectedTabColorControl.getColor() ); @@ -72,7 +76,7 @@ // selected text color Color selectedTextColor = tabbedPane.getSelectedTextColor(); - final ColorControl selectedTextColorControl = new ColorControl( parent, "text color (selected): ", selectedTextColor ); + final ColorControl selectedTextColorControl = new ColorControl( parentFrame, "text color (selected): ", selectedTextColor ); selectedTextColorControl.addChangeListener( new ChangeListener() { public void stateChanged( ChangeEvent event ) { tabbedPane.setSelectedTextColor( selectedTextColorControl.getColor() ); @@ -81,7 +85,7 @@ // unselected text color Color unselectedTextColor = tabbedPane.getUnselectedTextColor(); - final ColorControl unselectedTextColorControl = new ColorControl( parent, "text color (unselected): ", unselectedTextColor ); + final ColorControl unselectedTextColorControl = new ColorControl( parentFrame, "text color (unselected): ", unselectedTextColor ); unselectedTextColorControl.addChangeListener( new ChangeListener() { public void stateChanged( ChangeEvent event ) { tabbedPane.setUnselectedTextColor( unselectedTextColorControl.getColor() ); Index: src/edu/colorado/phet/common/piccolophet/PiccoloPhetApplication.java =================================================================== --- src/edu/colorado/phet/common/piccolophet/PiccoloPhetApplication.java (revision 35097) +++ src/edu/colorado/phet/common/piccolophet/PiccoloPhetApplication.java (revision 34845) @@ -1,14 +1,24 @@ /* Copyright 2003-2004, University of Colorado */ +/* + * CVS Info - + * Filename : $Source$ + * Branch : $Name$ + * Modified by : $Author:samreid $ + * Revision : $Revision:14676 $ + * Date modified : $Date:2007-04-17 02:58:50 -0500 (Tue, 17 Apr 2007) $ + */ package edu.colorado.phet.common.piccolophet; import edu.colorado.phet.common.phetcommon.application.PhetApplication; import edu.colorado.phet.common.phetcommon.application.PhetApplicationConfig; +import edu.colorado.phet.common.phetcommon.view.ITabbedModulePane; /** * PiccoloPhetApplication *

* Allows for the use of components and graphics that require Piccolo support. + *

* Piccolo-dependent items that can be specified: *

    *
  • PhetTabbedPane is used in Module instances. (JTabbedPane can be specified in the constructor, if @@ -16,17 +26,27 @@ *
* * @author Ron LeMaster + * @version $Revision:14676 $ */ public class PiccoloPhetApplication extends PhetApplication { + //-------------------------------------------------------------------------------------------------- + // Class fields and methods and inner classes + //-------------------------------------------------------------------------------------------------- + + // Graphical PhetTabbedPanes + public static final PhetApplication.TabbedPaneType PHET_TABBED_PANE = new PhetApplication.TabbedPaneType() { + public ITabbedModulePane createTabbedPane() { + return new TabbedModulePanePiccolo(); + } + }; + + //-------------------------------------------------------------------------------------------------- + // Instance fields and methods + //-------------------------------------------------------------------------------------------------- + public PiccoloPhetApplication( PhetApplicationConfig config ) { - this( config, new TabbedModulePanePiccolo() ); + super( config, PHET_TABBED_PANE ); } - - public PiccoloPhetApplication( PhetApplicationConfig config, TabbedModulePanePiccolo tabbedModulePane ) { - super( config, tabbedModulePane ); - - // Add Piccolo-specific items to the developer menu - getPhetFrame().getDeveloperMenu().add( new TabbedPanePropertiesMenuItem( getPhetFrame(), tabbedModulePane ) ); - } -} \ No newline at end of file + +} Index: src/edu/colorado/phet/common/piccolophet/PiccoloModule.java =================================================================== --- src/edu/colorado/phet/common/piccolophet/PiccoloModule.java (revision 35097) +++ src/edu/colorado/phet/common/piccolophet/PiccoloModule.java (revision 34845) @@ -61,7 +61,7 @@ public PiccoloModule( String name, IClock clock, boolean startsPaused ) { super( name, clock, startsPaused ); if ( hasHelp() ) { - helpPane = new HelpPane( PhetApplication.getInstance().getPhetFrame() ); + helpPane = new HelpPane( PhetApplication.instance().getPhetFrame() ); } } @@ -187,7 +187,7 @@ * @return Component */ private Component getGlassPane() { - return PhetApplication.getInstance().getPhetFrame().getGlassPane(); + return PhetApplication.instance().getPhetFrame().getGlassPane(); } /* @@ -197,7 +197,7 @@ private void setGlassPane( Component component ) { if ( component != null ) { restoreGlassPane = getGlassPane(); - PhetApplication.getInstance().getPhetFrame().setGlassPane( component ); + PhetApplication.instance().getPhetFrame().setGlassPane( component ); } } Index: piccolo-phet-build.properties =================================================================== --- piccolo-phet-build.properties (revision 35097) +++ piccolo-phet-build.properties (revision 34845) @@ -1,3 +1,7 @@ +project.name=Piccolo PhET +project.mainclass=??? +project.description=The PhET Extensions to Piccolo project.depends.lib=piccolo2d : phetcommon project.depends.source=src project.depends.data=data +project.screenshot= scala-common Index: scala-src/edu/colorado/phet/scalacommon/ScalaClock.scala =================================================================== --- scala-src/edu/colorado/phet/scalacommon/ScalaClock.scala (revision 35097) +++ scala-src/edu/colorado/phet/scalacommon/ScalaClock.scala (revision 34845) @@ -1,6 +1,6 @@ package edu.colorado.phet.scalacommon -import edu.colorado.phet.common.phetcommon.model.clock.{ConstantDtClock, ClockEvent, ClockAdapter} +import common.phetcommon.model.clock.{ConstantDtClock, ClockEvent, ClockAdapter} class ScalaClock(delay: Int, dt: Double) extends ConstantDtClock(delay, dt) { def addClockListener(exp: Double => Unit) { Index: scala-src/edu/colorado/phet/scalacommon/Predef.scala =================================================================== --- scala-src/edu/colorado/phet/scalacommon/Predef.scala (revision 35097) +++ scala-src/edu/colorado/phet/scalacommon/Predef.scala (revision 34845) @@ -2,10 +2,10 @@ import java.awt.event.{ActionEvent, ActionListener} import javax.swing.JButton -import edu.colorado.phet.scalacommon.math.Vector2D +import scalacommon.math.Vector2D import scala.swing.Component import java.awt.geom.Point2D -import edu.umd.cs.piccolo.util.PDimension +import umd.cs.piccolo.util.PDimension import view.MyButton object Predef { Index: scala-src/edu/colorado/phet/scalacommon/CBS.scala =================================================================== --- scala-src/edu/colorado/phet/scalacommon/CBS.scala (revision 35097) +++ scala-src/edu/colorado/phet/scalacommon/CBS.scala (revision 34845) @@ -1,11 +1,11 @@ package edu.colorado.phet.scalacommon -import edu.colorado.phet.common.phetcommon.view.graphics.transforms.ModelViewTransform2D -import edu.colorado.phet.common.piccolophet.PhetPCanvas +import common.phetcommon.view.graphics.transforms.ModelViewTransform2D +import common.piccolophet.PhetPCanvas import java.awt.Rectangle import javax.swing.JComponent import java.awt.geom.{AffineTransform, Rectangle2D} -import edu.umd.cs.piccolo.util.PDimension +import umd.cs.piccolo.util.PDimension //Trying a shorter name to see if it helps resolve this issue: //http://lampsvn.epfl.ch/trac/scala/ticket/735 Index: scala-src/edu/colorado/phet/scalacommon/view/ToggleListener.scala =================================================================== --- scala-src/edu/colorado/phet/scalacommon/view/ToggleListener.scala (revision 35097) +++ scala-src/edu/colorado/phet/scalacommon/view/ToggleListener.scala (revision 34845) @@ -1,6 +1,6 @@ package edu.colorado.phet.scalacommon.view -import edu.umd.cs.piccolo.event.{PInputEventListener, PInputEvent} +import umd.cs.piccolo.event.{PInputEventListener, PInputEvent} //decorator class ToggleListener(listener: PInputEventListener, isInteractive: () => Boolean) extends PInputEventListener { Index: scala-src/edu/colorado/phet/scalacommon/ScalaApplicationLauncher.scala =================================================================== --- scala-src/edu/colorado/phet/scalacommon/ScalaApplicationLauncher.scala (revision 35097) +++ scala-src/edu/colorado/phet/scalacommon/ScalaApplicationLauncher.scala (revision 34845) @@ -1,7 +1,7 @@ package edu.colorado.phet.scalacommon -import edu.colorado.phet.common.phetcommon.application._ -import edu.colorado.phet.common.phetcommon.view.PhetLookAndFeel +import common.phetcommon.application._ +import common.phetcommon.view.PhetLookAndFeel import javax.swing.UIManager /** Index: scala-src/edu/colorado/phet/scalacommon/record/RecordModel.scala =================================================================== --- scala-src/edu/colorado/phet/scalacommon/record/RecordModel.scala (revision 35097) +++ scala-src/edu/colorado/phet/scalacommon/record/RecordModel.scala (revision 34845) @@ -1,7 +1,7 @@ package edu.colorado.phet.scalacommon.record import _root_.edu.colorado.phet.common.phetcommon.math.Function.LinearFunction -import edu.colorado.phet.scalacommon.util.Observable +import scalacommon.util.Observable import _root_.scala.collection.mutable.ArrayBuffer object RecordModelDefaults { Index: scala-src/edu/colorado/phet/scalacommon/record/RecordModelControlPanel.scala =================================================================== --- scala-src/edu/colorado/phet/scalacommon/record/RecordModelControlPanel.scala (revision 35097) +++ scala-src/edu/colorado/phet/scalacommon/record/RecordModelControlPanel.scala (revision 34845) @@ -16,15 +16,15 @@ import javax.swing._ import java.util.{Hashtable, Dictionary} import javax.swing._ -import edu.colorado.phet.scalacommon.util.Observable -import edu.umd.cs.piccolo.event.{PBasicInputEventHandler, PInputEvent} -import edu.umd.cs.piccolo.nodes.{PImage, PText} -import edu.umd.cs.piccolo.PNode -import edu.umd.cs.piccolo.util.PBounds -import edu.umd.cs.piccolox.pswing.PSwing +import scalacommon.util.Observable +import umd.cs.piccolo.event.{PBasicInputEventHandler, PInputEvent} +import umd.cs.piccolo.nodes.{PImage, PText} +import umd.cs.piccolo.PNode +import umd.cs.piccolo.util.PBounds +import umd.cs.piccolox.pswing.PSwing import edu.colorado.phet.common.piccolophet.nodes.mediabuttons.PiccoloTimeControlPanel.BackgroundNode import edu.colorado.phet.scalacommon.Predef._ -import edu.colorado.phet.common.phetcommon.resources.PhetCommonResources._ +import common.phetcommon.resources.PhetCommonResources._ class RecordModelControlPanel[T](model: RecordModel[T], simPanel: JComponent, createRightControl: () => PNode, timelineColor: Color, maxTime: Double) extends PhetPCanvas { private class MyButtonNode(text: String, icon: Icon, action: () => Unit) extends PText(text) { Index: scala-src/edu/colorado/phet/scalacommon/record/ModePanel.scala =================================================================== --- scala-src/edu/colorado/phet/scalacommon/record/ModePanel.scala (revision 35097) +++ scala-src/edu/colorado/phet/scalacommon/record/ModePanel.scala (revision 34845) @@ -1,13 +1,13 @@ package edu.colorado.phet.scalacommon.record -import edu.colorado.phet.common.phetcommon.resources.PhetCommonResources +import common.phetcommon.resources.PhetCommonResources import edu.colorado.phet.common.phetcommon.view.util.PhetFont import scala.swing.{Component, Panel} import java.awt.Color import javax.swing.BoxLayout._ import javax.swing.{BoxLayout, JPanel, JComponent} import java.awt.Color._ -import edu.colorado.phet.scalacommon.swing.MyRadioButton +import scalacommon.swing.MyRadioButton import PhetCommonResources._ class ModePanel[T](model: RecordModel[T]) extends JPanel { Index: scala-src/edu/colorado/phet/scalacommon/record/Timeline.scala =================================================================== --- scala-src/edu/colorado/phet/scalacommon/record/Timeline.scala (revision 35097) +++ scala-src/edu/colorado/phet/scalacommon/record/Timeline.scala (revision 34845) @@ -9,12 +9,12 @@ import java.awt.event.{ComponentAdapter, ComponentEvent} import java.awt.geom.{Line2D} -import edu.umd.cs.piccolo.nodes.{PImage} -import edu.umd.cs.piccolo.PNode +import umd.cs.piccolo.nodes.{PImage} +import umd.cs.piccolo.PNode import edu.colorado.phet.scalacommon.Predef._ -import edu.umd.cs.piccolo.event.{PBasicInputEventHandler, PInputEvent} +import umd.cs.piccolo.event.{PBasicInputEventHandler, PInputEvent} class Timeline[T](model: RecordModel[T], canvas: PhetPCanvas, timelineColor: Color, maxTime: Double) extends PNode { val pathOffsetY = 4 Index: scala-src/edu/colorado/phet/scalacommon/record/PlaybackSpeedSlider.scala =================================================================== --- scala-src/edu/colorado/phet/scalacommon/record/PlaybackSpeedSlider.scala (revision 35097) +++ scala-src/edu/colorado/phet/scalacommon/record/PlaybackSpeedSlider.scala (revision 34845) @@ -1,7 +1,7 @@ package edu.colorado.phet.scalacommon.record import _root_.edu.colorado.phet.common.piccolophet.event.CursorHandler -import edu.colorado.phet.common.phetcommon.resources.PhetCommonResources +import common.phetcommon.resources.PhetCommonResources import edu.colorado.phet.common.phetcommon.math.Function.LinearFunction import edu.colorado.phet.common.phetcommon.view.controls.valuecontrol.LinearValueControl import java.awt.Color @@ -10,9 +10,9 @@ import javax.swing.event.{ChangeListener, ChangeEvent} import javax.swing.{JSlider, JLabel} -import edu.umd.cs.piccolo.PNode -import edu.umd.cs.piccolox.pswing.PSwing -import edu.colorado.phet.common.phetcommon.resources.PhetCommonResources._ +import umd.cs.piccolo.PNode +import umd.cs.piccolox.pswing.PSwing +import common.phetcommon.resources.PhetCommonResources._ class PlaybackSpeedSlider[T](model: RecordModel[T]) extends PNode { addInputEventListener(new CursorHandler) piccolo2d Index: piccolo2d-build.properties =================================================================== --- piccolo2d-build.properties (revision 35097) +++ piccolo2d-build.properties (revision 34845) @@ -1,2 +1,5 @@ +project.name=Piccolo + +#Extras also depends on JUnit project.depends.lib=swt/swt.jar junit/junit.jar project.depends.source=core/src/main/java : extras/src/main/java : examples/src/main/java \ No newline at end of file force-law-lab Index: data/force-law-lab/localization/force-law-lab-strings.properties =================================================================== --- data/force-law-lab/localization/force-law-lab-strings.properties (revision 35097) +++ data/force-law-lab/localization/force-law-lab-strings.properties (revision 34845) @@ -1,4 +1,5 @@ gravity-force-lab.name =Gravity Force Lab +gravity-force-lab.description =Visualize the force of objects on one another, and see how it relates to the distance between them. force-description-pattern-target_source_value=Force on {0} by {1} = {2} N readout.pattern-bodyname={0} mass