Changeset 365
- Timestamp:
- 01/31/12 18:42:46 (12 years ago)
- Location:
- ether_megapoli/trunk/service/implementation
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
ether_megapoli/trunk/service/implementation/com/ether/EtherPlotContentServiceImpl.java
r295 r365 38 38 import java.util.ArrayList; 39 39 import java.util.Arrays; 40 import java.util.Calendar; 40 41 import java.util.Collections; 41 42 import java.util.Date; … … 170 171 displayLegendForEmptyLines( emptyLineToDisplayOnlyInLegend, lkey, mainPane, xsize, ysize, xt, (LinearTransform) graph.getYTransform(), megapoliPlot.getAxeType() ); 171 172 173 // Copyright 174 displayCopyright( mainPane, xsize, ysize, xsize - 0.15, 0.1 ); 175 172 176 return mainPane; 173 177 } … … 235 239 throw new ServiceException( ServiceException.ServiceCode.LEGEND_LAYER_NOT_FOUND, new Throwable( ServiceException.ServiceCode.LEGEND_LAYER_NOT_FOUND.toString() ) ); 236 240 } 241 242 // Copyright 243 displayCopyright( jPlotLayout, 1.0, 1.0, 1.15, 0.03 ); 237 244 238 245 return jPlotLayout; … … 322 329 323 330 /** 331 * This method display the copyright in the bottom right corner of the plot 332 * 333 * @param mainPane 334 * @param xSize 335 * @param ySize 336 * @param xPosition 337 * @param yPosition 338 */ 339 private void displayCopyright( @NotNull final JPane mainPane, final double xSize, final double ySize, final double xPosition, final double yPosition ) 340 { 341 final Layer copyrightLayer = new Layer( "Copyright", new Dimension2D( xSize, ySize ) ); 342 mainPane.add( copyrightLayer ); 343 344 final Calendar calendar = Calendar.getInstance(); 345 final int year = calendar.get( Calendar.YEAR ); 346 final String copyright = "@" + year + _copyright; 347 final SGLabel copyrightLabel = new SGLabel( "copyright", copyright, new Point2D.Double( xPosition, yPosition ) ); 348 copyrightLabel.setAlign( SGLabel.TOP, SGLabel.CENTER ); 349 copyrightLabel.setFont( _copyrightFont ); 350 351 copyrightLayer.addChild( copyrightLabel ); 352 } 353 354 /** 324 355 * This method removes from a list the lines with no data 325 356 * … … 380 411 xbot.setLabelFont( _axisFont ); 381 412 xbot.setLabelHeightP( _heightAxisFont ); 413 // TimeZone indication 414 xbot.setTitle( new SGLabel( "timeZone", " (UTC)", null ) ); 382 415 // xbot.setMajorLabelFormat( _majorLabelFormat ); 383 416 return xbot; … … 618 651 619 652 protected static final Font _axisFont = new Font( "Helvetica", Font.PLAIN, 15 ); 653 protected static final Font _copyrightFont = new Font( "Helvetica", Font.PLAIN, 8 ); 654 protected static final String _copyright = " CNES-CNRS"; 620 655 protected static final double _heightAxisFont = 0.14; 621 656 protected static final double _markHeight = 0.1; -
ether_megapoli/trunk/service/implementation/gov/noaa/pmel/sgt/TimeAxis.java
r192 r365 273 273 Color saved = g.getColor(); 274 274 SGLabel label; 275 if(orientation_ == Axis.HORIZONTAL) { 276 label = new SGLabel("major", time.toString(majorLabelFormat_), 275 // VMIPSL 276 String labelStr = time.toString( majorLabelFormat_ ); 277 if( title_ != null ) 278 labelStr += title_.getText(); 279 if(orientation_ == Axis.HORIZONTAL) { 280 label = new SGLabel("major", labelStr, 277 281 new Point2D.Double(val, ymajor_)); 278 282 label.setOrientation(SGLabel.HORIZONTAL); 279 283 } else { 280 label = new SGLabel("major", time.toString(majorLabelFormat_),284 label = new SGLabel("major", labelStr, 281 285 new Point2D.Double(xmajor_, val)); 282 286 label.setOrientation(SGLabel.VERTICAL); … … 776 780 } 777 781 } 778 public void setTitle(SGLabel title) { 779 // Time axes don't use title_ 780 title_ = null; 781 } 782 783 public void setTitle( final SGLabel title ) 784 { 785 // Time axes don't use title_ 786 // title_ = null; 787 // VMIPSL 788 if( title_ == null || !title_.equals( title ) ) 789 { 790 title_ = title; 791 title_.setMoveable( false ); 792 modified( "Axis: setTitle()" ); 793 } 794 } 782 795 } 783 796
Note: See TracChangeset
for help on using the changeset viewer.