Changeset 175


Ignore:
Timestamp:
09/05/11 17:54:45 (13 years ago)
Author:
vmipsl
Message:

Applets _ essais

Location:
ether_megapoli/trunk
Files:
1 added
2 edited
3 copied
1 moved

Legend:

Unmodified
Added
Removed
  • ether_megapoli/trunk/applets/Applets.iml

    r174 r175  
    22<module type="JAVA_MODULE" version="4"> 
    33  <component name="NewModuleRootManager" inherit-compiler-output="false"> 
    4     <output url="file://$MODULE_DIR$/../web/applets" /> 
     4    <output url="file://$MODULE_DIR$/../web/WEB-INF-Applets/classes" /> 
    55    <output-test url="file://$MODULE_DIR$/../out/test/applets" /> 
    66    <exclude-output /> 
     
    1010    <orderEntry type="inheritedJdk" /> 
    1111    <orderEntry type="sourceFolder" forTests="false" /> 
     12    <orderEntry type="library" name="lib_ether" level="project" /> 
     13    <orderEntry type="module" module-name="Service" /> 
     14    <orderEntry type="module" module-name="Domain" /> 
     15    <orderEntry type="module" module-name="Common" /> 
     16    <orderEntry type="module" module-name="Persistence" /> 
    1217  </component> 
    1318</module> 
  • ether_megapoli/trunk/applets/src/PIFAppletTimeSerie.java

    r174 r175  
     1import com.ether.EtherPlotService; 
     2import com.ether.EtherService; 
     3import com.ether.ServiceException; 
     4import com.medias.database.objects.Parametre; 
    15import gov.noaa.pmel.sgt.Axis; 
    26import gov.noaa.pmel.sgt.CartesianGraph; 
     
    2327import gov.noaa.pmel.util.SoTRange; 
    2428import gov.noaa.pmel.util.TimeRange; 
     29import org.apache.commons.logging.Log; 
     30import org.apache.commons.logging.LogFactory; 
     31import org.springframework.context.support.ClassPathXmlApplicationContext; 
    2532 
    2633import javax.swing.*; 
    2734import javax.swing.border.EtchedBorder; 
    2835import java.awt.*; 
     36import java.util.Calendar; 
    2937import java.util.Enumeration; 
    3038 
    31 public class AppletTimeSerie 
     39/** 
     40 * Example demonstrating how to use <code>setLayout()</code> with 
     41 * <code>JPane</code> to change how <code>Layer</code>s are placed on 
     42 * a <code>JPane</code>.  <code>JLayoutDemo</code> constructs the 
     43 * plots from basic <code>sgt</code> objects. 
     44 * 
     45 * @author Donald Denbo 
     46 * @version $Revision: 1.6 $, $Date: 2001/02/06 00:14:35 $ 
     47 * @since 2.0 
     48 */ 
     49public class PIFAppletTimeSerie 
    3250        extends JApplet 
    3351{ 
     
    3755    JFrame frame = null; 
    3856 
    39     JPanel controlPanel = new JPanel(); 
    40     JCheckBox stacked = new JCheckBox(); 
    41     ButtonGroup gridtype = new ButtonGroup(); 
    42     JCheckBox grid = new JCheckBox(); 
    43     JButton showTree = new JButton(); 
    44  
    4557    public void init() 
    4658    { 
    47         /* 
    48         * Create a JLayoutDemo within a JApplet 
    49         */ 
    5059        setLayout( new BorderLayout( 0, 0 ) ); 
    5160        setBackground( Color.white ); 
     
    5766        makeGraph(); 
    5867        add( mainPane_, BorderLayout.CENTER ); 
     68 
     69        // Context 
     70//        final String appletContext = "applet-context.xml"; 
     71//        final String hibernateContext = "hibernate.cfg.xml"; 
     72//        final String[] contextPaths = new String[]{appletContext, hibernateContext}; 
     73// 
     74//        final ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext( contextPaths ); 
     75//        _etherService = (EtherService) context.getBean( "etherService", EtherService.class ); 
     76//        _etherPlotService = (EtherPlotService) context.getBean( "etherPlotService", EtherPlotService.class ); 
     77    } 
     78 
     79    public void start() 
     80    { 
     81//        // Parameters 
     82//        final Integer plateformId = Integer.valueOf( getParameter( "plateformId" ) ); 
     83//        final Integer parameterId = Integer.valueOf( getParameter( "parameterId" ) ); 
     84//        final String title = getParameter( "title" ); 
     85//        final String axeType = getParameter( "axeType" ); 
     86// 
     87//        // Dates 
     88//        final String dateBegin = getParameter( "dateBegin" ); 
     89//        final String dateEnd = getParameter( "dateEnd" ); 
     90//        final Calendar calendar = Calendar.getInstance(); 
     91 
     92 
     93        /* 
     94        * Create a JLayoutDemo within a JApplet 
     95        */ 
     96//        try 
     97//        { 
     98//            final Parametre parametre = _etherService.getParameterById( 90 ); 
     99//            final String paf = "pif"; 
     100//        } 
     101//        catch( ServiceException e ) 
     102//        { 
     103//            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates. 
     104//        } 
     105//        setLayout( new BorderLayout( 0, 0 ) ); 
     106//        setBackground( Color.white ); 
     107//        setSize( 426, 712 ); 
     108// 
     109//        makeControlPanel(); 
     110//        add( controlPanel, BorderLayout.SOUTH ); 
     111// 
     112//        makeGraph(); 
     113//        add( mainPane_, BorderLayout.CENTER ); 
    59114    } 
    60115 
     
    334389                new SGLabel( "2nd line", "Blue Data", 
    335390                        new Point2D.Double( 0.0, 0.0 ) ) ); 
     391 
     392    } 
     393 
     394    JPanel controlPanel = new JPanel(); 
     395    JCheckBox stacked = new JCheckBox(); 
     396    ButtonGroup gridtype = new ButtonGroup(); 
     397    JCheckBox grid = new JCheckBox(); 
     398    JButton showTree = new JButton(); 
     399 
     400    class SymItem 
     401            implements java.awt.event.ItemListener 
     402    { 
     403        public void itemStateChanged( java.awt.event.ItemEvent event ) 
     404        { 
     405            Object object = event.getSource(); 
     406            if( object == stacked ) 
     407                stacked_itemStateChanged( event ); 
     408            else if( object == grid ) 
     409                grid_itemStateChanged( event ); 
     410        } 
    336411    } 
    337412 
     
    445520    } 
    446521 
    447     void showTree_ActionPerformed( java.awt.event.ActionEvent event ) 
    448     { 
    449         /* 
    450         * Create the ClassTree dialog to display the classes used 
    451         * in the mainPane_ and allow editing. 
    452         */ 
    453         if( tree_ == null ) 
    454         { 
    455             tree_ = new JClassTree( "Classes for LayoutDemo" ); 
    456         } 
    457         tree_.setJPane( mainPane_ ); 
    458         tree_.show(); 
    459     } 
    460  
    461     class SymItem 
    462             implements java.awt.event.ItemListener 
    463     { 
    464         public void itemStateChanged( java.awt.event.ItemEvent event ) 
    465         { 
    466             Object object = event.getSource(); 
    467             if( object == stacked ) 
    468                 stacked_itemStateChanged( event ); 
    469             else if( object == grid ) 
    470                 grid_itemStateChanged( event ); 
    471         } 
    472     } 
    473  
    474522    class SymAction 
    475523            implements java.awt.event.ActionListener 
     
    483531    } 
    484532 
     533    void showTree_ActionPerformed( java.awt.event.ActionEvent event ) 
     534    { 
     535        /* 
     536        * Create the ClassTree dialog to display the classes used 
     537        * in the mainPane_ and allow editing. 
     538        */ 
     539        if( tree_ == null ) 
     540        { 
     541            tree_ = new JClassTree( "Classes for LayoutDemo" ); 
     542        } 
     543        tree_.setJPane( mainPane_ ); 
     544        tree_.show(); 
     545    } 
     546 
     547//    private static final Log LOGGER = LogFactory.getLog( PIFAppletTimeSerie.class ); 
     548// 
     549//    private EtherService _etherService; 
     550//    private EtherPlotService _etherPlotService; 
    485551} 
  • ether_megapoli/trunk/applets/src/hibernate-domain.cfg.xml

    r174 r175  
    55 
    66<hibernate-configuration> 
    7         <session-factory> 
     7    <session-factory> 
    88 
    99        <!--<mapping resource="com/medias/objects/Adresse.hbm.xml"/>--> 
     
    3434        <!--<mapping resource="com/medias/objects/Zone.hbm.xml"/>--> 
    3535 
    36         </session-factory> 
     36    </session-factory> 
    3737</hibernate-configuration> 
  • ether_megapoli/trunk/web/src/ApplicationResources.properties

    r173 r175  
    448448data.visualization.EndDate=Date de fin : 
    449449data.visualization.Unvalid_Period=P\u00E9riode non valide ! 
    450 data.visualization.titleChoice=Title 
     450data.visualization.titleChoice=Titre 
    451451data.visualization.type=Type de trac\u00E9 
    452452data.visualization.graph=Quicklook final : 
  • ether_megapoli/trunk/web/visualization/visu_parameter_by_pf-script.jsp

    r174 r175  
    303303//        this.plotWindow.getContent().innerHTML = '<img src=' + url + ' />'; 
    304304 
    305         this.plotWindow.getContent().innerHTML = '<applet code="AppletEE.class" codebase="<%=request.getContextPath()%>/applets" height="400px" width="400px"></applet>'; 
     305        this.plotWindow.getContent().innerHTML = '<applet code="AppletTimeSerie.class" codebase="<%=request.getContextPath()%>/applets" height="400px" width="400px"> ' + 
     306                '<param name="plateformId" value="14"> ' + 
     307                '<param name="parameterId" value="90"> ' + 
     308                '<param name="dateBegin" value=""> ' + 
     309                '<param name="dateEnd" value=""> ' + 
     310                '<param name="title" value="zzzz"> ' + 
     311                '<param name="axeType" value="MOBILE"> ' + 
     312                '</applet>'; 
    306313        this.plotWindow.setSize( <%=EtherPlotServiceImpl.getMaxWidth()%>, <%=EtherPlotServiceImpl.getMaxHeight()%> ); 
    307314        this.plotWindow.show(); 
Note: See TracChangeset for help on using the changeset viewer.