Coverage Report - org.argouml.uml.diagram.ui.TabDiagram
 
Classes in this File Line Coverage Branch Coverage Complexity
ArgoEditor
0%
0/51
0%
0/26
2.5
TabDiagram
71%
82/115
44%
26/58
2.5
TabDiagram$1
100%
4/4
N/A
2.5
 
 1  
 /* $Id: TabDiagram.java 17865 2010-01-12 20:45:26Z linus $
 2  
  *****************************************************************************
 3  
  * Copyright (c) 2009 Contributors - see below
 4  
  * All rights reserved. This program and the accompanying materials
 5  
  * are made available under the terms of the Eclipse Public License v1.0
 6  
  * which accompanies this distribution, and is available at
 7  
  * http://www.eclipse.org/legal/epl-v10.html
 8  
  *
 9  
  * Contributors:
 10  
  *    tfmorris
 11  
  *****************************************************************************
 12  
  *
 13  
  * Some portions of this file was previously release using the BSD License:
 14  
  */
 15  
 
 16  
 // Copyright (c) 1996-2008 The Regents of the University of California. All
 17  
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 18  
 // software and its documentation without fee, and without a written
 19  
 // agreement is hereby granted, provided that the above copyright notice
 20  
 // and this paragraph appear in all copies.  This software program and
 21  
 // documentation are copyrighted by The Regents of the University of
 22  
 // California. The software program and documentation are supplied "AS
 23  
 // IS", without any accompanying services from The Regents. The Regents
 24  
 // does not warrant that the operation of the program will be
 25  
 // uninterrupted or error-free. The end-user understands that the program
 26  
 // was developed for research purposes and is advised not to rely
 27  
 // exclusively on the program for any reason.  IN NO EVENT SHALL THE
 28  
 // UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
 29  
 // SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
 30  
 // ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
 31  
 // THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
 32  
 // SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
 33  
 // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 34  
 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
 35  
 // PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
 36  
 // CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
 37  
 // UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 38  
 
 39  
 package org.argouml.uml.diagram.ui;
 40  
 
 41  
 import java.awt.BorderLayout;
 42  
 import java.awt.Graphics;
 43  
 import java.awt.Graphics2D;
 44  
 import java.awt.RenderingHints;
 45  
 import java.awt.event.MouseEvent;
 46  
 import java.beans.PropertyChangeEvent;
 47  
 import java.beans.PropertyChangeListener;
 48  
 import java.util.ArrayList;
 49  
 import java.util.Arrays;
 50  
 import java.util.List;
 51  
 import java.util.Vector;
 52  
 
 53  
 import javax.swing.JComponent;
 54  
 import javax.swing.JPanel;
 55  
 import javax.swing.JToolBar;
 56  
 import javax.swing.SwingUtilities;
 57  
 import javax.swing.border.EtchedBorder;
 58  
 
 59  
 import org.apache.log4j.Logger;
 60  
 import org.argouml.application.api.AbstractArgoJPanel;
 61  
 import org.argouml.application.api.Argo;
 62  
 import org.argouml.configuration.Configuration;
 63  
 import org.argouml.ui.TabModelTarget;
 64  
 import org.argouml.ui.targetmanager.TargetEvent;
 65  
 import org.argouml.ui.targetmanager.TargetManager;
 66  
 import org.argouml.uml.diagram.ArgoDiagram;
 67  
 import org.argouml.uml.ui.ActionCopy;
 68  
 import org.argouml.uml.ui.ActionCut;
 69  
 import org.tigris.gef.base.Diagram;
 70  
 import org.tigris.gef.base.Editor;
 71  
 import org.tigris.gef.base.FigModifyingMode;
 72  
 import org.tigris.gef.base.Globals;
 73  
 import org.tigris.gef.base.LayerManager;
 74  
 import org.tigris.gef.base.ModeSelect;
 75  
 import org.tigris.gef.event.GraphSelectionEvent;
 76  
 import org.tigris.gef.event.GraphSelectionListener;
 77  
 import org.tigris.gef.event.ModeChangeEvent;
 78  
 import org.tigris.gef.event.ModeChangeListener;
 79  
 import org.tigris.gef.graph.GraphModel;
 80  
 import org.tigris.gef.graph.presentation.JGraph;
 81  
 import org.tigris.gef.presentation.Fig;
 82  
 import org.tigris.toolbar.ToolBarFactory;
 83  
 
 84  
 
 85  
 /**
 86  
  * The TabDiagram is the tab in the multieditorpane that holds a diagram. The
 87  
  * TabDiagram consists of a JGraph (with the figs) and a toolbar.
 88  
  * It used to be possible (in past versions of ArgoUML)
 89  
  * to spawn objects of this class into a dialog via the spawn method of its
 90  
  * parent.
 91  
  * <p>
 92  
  * NOTE: This tab is unlike the others in that it acts as a bridge to forward
 93  
  * received Diagram events to the TargetManager.  (Not sure if this 
 94  
  * functionality is duplicated elsewhere - tfm 20070924)
 95  
  */
 96  900
 public class TabDiagram
 97  
     extends AbstractArgoJPanel
 98  
     implements TabModelTarget, GraphSelectionListener, ModeChangeListener,
 99  
     PropertyChangeListener {
 100  
 
 101  
     /**
 102  
      * Logger.
 103  
      */
 104  900
     private static final Logger LOG = Logger.getLogger(TabDiagram.class);
 105  
 
 106  
     /**
 107  
      * The diagram object.
 108  
      */
 109  
     private UMLDiagram target;
 110  
 
 111  
     /**
 112  
      * The GEF JGraph in where the figs are painted.
 113  
      */
 114  
     private JGraph graph;
 115  
 
 116  
     /**
 117  
      * Prevents target event cycles between this and the TargetManager.
 118  
      */
 119  
     private boolean updatingSelection;
 120  
 
 121  
     /**
 122  
      * The toolbar that is positioned just above
 123  
      * the diagram containing the drawing tools.
 124  
      */
 125  
     private JToolBar toolBar;
 126  
 
 127  
     /**
 128  
      * Default constructor.
 129  
      */
 130  
     public TabDiagram() {
 131  900
         this("Diagram");
 132  900
     }
 133  
 
 134  
     /**
 135  
      * Constructor.
 136  
      *
 137  
      * @param tag The type of diagram that we are creating.
 138  
      */
 139  
     public TabDiagram(String tag) {
 140  900
         super(tag);
 141  900
         setLayout(new BorderLayout());
 142  900
         graph = new DnDJGraph();
 143  900
         graph.setDrawingSize((612 - 30) * 2, (792 - 55 - 20) * 2);
 144  
         // TODO: should update to size of diagram contents
 145  
 
 146  900
         Globals.setStatusBar(new StatusBarAdapter());
 147  
         
 148  900
         JPanel p = new JPanel();
 149  900
         p.setLayout(new BorderLayout());
 150  900
         p.setBorder(new EtchedBorder(EtchedBorder.LOWERED));
 151  900
         p.add(graph, BorderLayout.CENTER);
 152  900
         add(p, BorderLayout.CENTER);
 153  900
         graph.addGraphSelectionListener(this);
 154  900
         graph.addModeChangeListener(this);
 155  900
     }
 156  
 
 157  
     /*
 158  
      * The clone method that should clone the JGraph with it's contents and
 159  
      * the toolbar with it's contents. Since both JGraph as the toolbar are
 160  
      * coming from the GEF framework, cloning them will be hard work and should
 161  
      * actually not be placed here but in a clone method of the JGraph and the
 162  
      * Toolbar.
 163  
      * @see java.lang.Object#clone()
 164  
      */
 165  
     @Override
 166  
     public Object clone() {
 167  
         // next statement gives us a clone JGraph but not a cloned Toolbar
 168  0
         TabDiagram newPanel = new TabDiagram();
 169  0
         if (target != null) {
 170  0
             newPanel.setTarget(target);
 171  
         }
 172  0
         ToolBarFactory factory = new ToolBarFactory(target.getActions());
 173  0
         factory.setRollover(true);
 174  0
         factory.setFloatable(false);
 175  
 
 176  0
         newPanel.setToolBar(factory.createToolBar());
 177  0
         setToolBar(factory.createToolBar());
 178  0
         return newPanel;
 179  
     }
 180  
 
 181  
     /**
 182  
      * Sets the target of the tab. The target should always be an instance of
 183  
      * UMLDiagram.
 184  
      * 
 185  
      * @param t the target
 186  
      */
 187  
     public void setTarget(Object t) {
 188  
 
 189  1327
         if (!(t instanceof UMLDiagram)) {
 190  
             // This is perfectly normal and happens among other things
 191  
             // within the call to setDiagram (below).
 192  126
             LOG.debug("target is null in set target or "
 193  
                       + "not an instance of UMLDiagram");
 194  126
             return;
 195  
         }
 196  1201
         UMLDiagram newTarget = (UMLDiagram) t;
 197  
 
 198  1201
         if (target != null) {
 199  301
             target.removePropertyChangeListener("remove", this);
 200  
         }
 201  1201
         newTarget.addPropertyChangeListener("remove", this);
 202  
 
 203  1201
         setToolBar(newTarget.getJToolBar());
 204  
         
 205  
         // NOTE: This listener needs to always be active 
 206  
         // even if this tab isn't visible
 207  1201
         graph.removeGraphSelectionListener(this);
 208  1201
         graph.setDiagram(newTarget);
 209  1201
         graph.addGraphSelectionListener(this);
 210  1201
         target = newTarget;
 211  1201
     }
 212  
 
 213  
     /*
 214  
      * @see org.argouml.ui.TabTarget#getTarget()
 215  
      */
 216  
     public Object getTarget() {
 217  301
         return target;
 218  
     }
 219  
 
 220  
     /**
 221  
      * Getter for the Toolbar.
 222  
      *
 223  
      * @return The ToolBar.
 224  
      */
 225  
     public JToolBar getToolBar() {
 226  0
         return toolBar;
 227  
     }
 228  
 
 229  
     /*
 230  
      * @see org.argouml.ui.TabTarget#refresh()
 231  
      */
 232  
     public void refresh() {
 233  0
         setTarget(target);
 234  0
     }
 235  
 
 236  
     /*
 237  
      * @see org.argouml.ui.TabTarget#shouldBeEnabled(java.lang.Object)
 238  
      */
 239  
     public boolean shouldBeEnabled(Object newTarget) {
 240  900
         return newTarget instanceof ArgoDiagram;
 241  
     }
 242  
 
 243  
 
 244  
     /**
 245  
      * Getter for the {@link JGraph}.
 246  
      *
 247  
      * @return The JGraph.
 248  
      */
 249  
     public JGraph getJGraph() {
 250  1800
         return graph;
 251  
     }
 252  
 
 253  
     /*
 254  
      * @see java.awt.Component#setVisible(boolean)
 255  
      */
 256  
     public void setVisible(boolean b) {
 257  1800
         super.setVisible(b);
 258  1800
         getJGraph().setVisible(b);
 259  1800
     }
 260  
 
 261  
     ////////////////////////////////////////////////////////////////
 262  
     // events
 263  
 
 264  
     /**
 265  
      * In the selectionChanged method not only the selection of this
 266  
      * diagram is set but also the selection in the projectbrowser.
 267  
      *
 268  
      * @param gse The event.
 269  
      */
 270  
     public void selectionChanged(GraphSelectionEvent gse) {
 271  20
         if (!updatingSelection) {
 272  20
             updatingSelection = true;
 273  20
             List<Fig> selections = gse.getSelections();
 274  20
             ActionCut.getInstance().setEnabled(
 275  
                     selections != null && !selections.isEmpty());
 276  
 
 277  
             // TODO: If ActionCopy is no longer a singleton, how shall
 278  
             //       this work?
 279  20
             ActionCopy.getInstance()
 280  
                     .setEnabled(selections != null && !selections.isEmpty());
 281  
             /*
 282  
              * ActionPaste.getInstance().setEnabled( Globals.clipBoard
 283  
              * != null && !Globals.clipBoard.isEmpty());
 284  
              */
 285  
             // the old selection
 286  20
             List currentSelection =
 287  
                 TargetManager.getInstance().getTargets();
 288  
 
 289  20
             List removedTargets = new ArrayList(currentSelection);
 290  20
             List addedTargets = new ArrayList();
 291  20
             for (Object selection : selections) {
 292  0
                 Object owner = TargetManager.getInstance().getOwner(selection);
 293  0
                 if (currentSelection.contains(owner)) {
 294  0
                     removedTargets.remove(owner); // remains selected
 295  
                 } else {
 296  
                     // add to selection
 297  0
                     addedTargets.add(owner);
 298  
                 }
 299  0
             }
 300  20
             if (addedTargets.size() == 1
 301  
                     && removedTargets.size() == currentSelection.size()
 302  
                     && removedTargets.size() != 0) {
 303  
                 // Optimize for the normal case to minimize target changes
 304  0
                 TargetManager.getInstance().setTarget(addedTargets.get(0));
 305  
             } else {
 306  20
                 for (Object o : removedTargets) {
 307  20
                     TargetManager.getInstance().removeTarget(o);
 308  
                 }
 309  20
                 for (Object o : addedTargets) {
 310  0
                     TargetManager.getInstance().addTarget(o);
 311  
                 }
 312  
             }
 313  20
             updatingSelection = false;
 314  
         }
 315  
 
 316  20
     }
 317  
 
 318  
     /**
 319  
      * @param listener the listener to be removed
 320  
      */
 321  
     public void removeGraphSelectionListener(GraphSelectionListener listener) {
 322  0
         graph.removeGraphSelectionListener(listener);
 323  0
     }
 324  
 
 325  
     /*
 326  
      * @see org.tigris.gef.event.ModeChangeListener#modeChange(org.tigris.gef.event.ModeChangeEvent)
 327  
      */
 328  
     public void modeChange(ModeChangeEvent mce) {
 329  0
         LOG.debug("TabDiagram got mode change event");
 330  0
         if (target != null    // Target might not have been initialised yet. 
 331  
                 && !Globals.getSticky() 
 332  
                 && Globals.mode() instanceof ModeSelect) {
 333  
 //            if (_target instanceof UMLDiagram) {
 334  0
             target.deselectAllTools();
 335  
 //            }
 336  
         }
 337  0
     }
 338  
 
 339  
 
 340  
     /**
 341  
      * @param listener the listener to be removed
 342  
      */
 343  
     public void removeModeChangeListener(ModeChangeListener listener) {
 344  0
         graph.removeModeChangeListener(listener);
 345  0
     }
 346  
 
 347  
     /**
 348  
      * Sets the toolbar.  Adds the toolbar to the north borderlayout
 349  
      * position of the diagram.<p>
 350  
      *
 351  
      * @param toolbar is the toolbar to be set.
 352  
      */
 353  
     public void setToolBar(JToolBar toolbar) {
 354  
         // TODO: This must happen on the AWT thread
 355  1201
         if (!Arrays.asList(getComponents()).contains(toolbar)) {
 356  1201
             if (target != null) {
 357  301
                 remove(((UMLDiagram) getTarget()).getJToolBar());
 358  
             }
 359  1201
             add(toolbar, BorderLayout.NORTH);
 360  1201
             toolBar = toolbar;
 361  1201
             invalidate();
 362  1201
             validate();
 363  1201
             repaint();
 364  
         }
 365  1201
     }
 366  
 
 367  
     /*
 368  
      * @see org.argouml.ui.targetmanager.TargetListener#targetAdded(
 369  
      *          TargetEvent)
 370  
      */
 371  
     public void targetAdded(final TargetEvent e) {
 372  0
         setNewTargets(e);
 373  0
     }
 374  
 
 375  
     /*
 376  
      * @see org.argouml.ui.targetmanager.TargetListener#targetRemoved(
 377  
      *          TargetEvent)
 378  
      */
 379  
     public void targetRemoved(final TargetEvent e) {
 380  
         // how to handle empty target lists?
 381  
         // probably the TabDiagram should only show an empty pane in that case
 382  88
         setNewTargets(e);
 383  88
     }
 384  
 
 385  
     /*
 386  
      * @see org.argouml.ui.targetmanager.TargetListener#targetSet(
 387  
      *          org.argouml.ui.targetmanager.TargetEvent)
 388  
      */
 389  
     public void targetSet(final TargetEvent e) {
 390  1239
         setNewTargets(e);
 391  1239
     }
 392  
 
 393  
     /**
 394  
      * We have no guarantee which thread our events will be delivered on,
 395  
      * so make sure the work gets done on our AWT event thread.
 396  
      * 
 397  
      * @param e the target change event 
 398  
      */
 399  
     private void setNewTargets(final TargetEvent e) {
 400  1327
         if (SwingUtilities.isEventDispatchThread()) {
 401  427
             setTarget(e.getNewTarget());
 402  427
             select(e.getNewTargets());            
 403  
         } else {
 404  900
             SwingUtilities.invokeLater(new Runnable() {
 405  
                 public void run() {
 406  900
                     setTarget(e.getNewTarget());
 407  900
                     select(e.getNewTargets());                
 408  900
                 }
 409  
             });
 410  
         }
 411  1327
     }
 412  
     
 413  
     private void select(Object[] targets) {
 414  1327
         LayerManager manager = graph.getEditor().getLayerManager();
 415  1327
         List<Fig> figList = new ArrayList<Fig>();
 416  2528
         for (int i = 0; i < targets.length; i++) {
 417  1201
             if (targets[i] != null) {
 418  1201
                 Fig theTarget = null;
 419  1201
                 if (targets[i] instanceof Fig
 420  
                         && manager.getActiveLayer().getContents().contains(
 421  
                                 targets[i])) {
 422  0
                     theTarget = (Fig) targets[i];
 423  
                 } else {
 424  1201
                     theTarget = manager.presentationFor(targets[i]);
 425  
                 }
 426  
 
 427  1201
                 if (theTarget != null && !figList.contains(theTarget)) {
 428  0
                     figList.add(theTarget);
 429  
                 }
 430  
             }
 431  
         }
 432  
 
 433  
         // This checks the order in addition to the contents
 434  
         // Is that really what we want here? - tfm 20070603
 435  1327
         if (!figList.equals(graph.selectedFigs())) {
 436  0
             graph.deselectAll();
 437  0
             graph.select(new Vector<Fig>(figList));
 438  
         }
 439  1327
     }
 440  
 
 441  
     /**
 442  
      * The UID.
 443  
      */
 444  
     private static final long serialVersionUID = -3305029387374936153L;
 445  
 
 446  
     public void propertyChange(PropertyChangeEvent arg0) {
 447  
         // Any Swing work done here needs to be queued to the AWT thread
 448  
         // since we don't know what thread our event will arrive on 
 449  
         
 450  68
         if ("remove".equals(arg0.getPropertyName())) {
 451  68
             LOG.debug("Got remove event for diagram = " + arg0.getSource() 
 452  
                     + " old value = " + arg0.getOldValue());
 453  
             // Although we register for notification of diagrams being
 454  
             // deleted, we currently depend on the TargetManager to assign
 455  
             // a new target when this happens
 456  
             // When we implement MDI and have our own list of open diagrams
 457  
             // we can ressurect the use of this
 458  
         }
 459  68
     }
 460  
 }
 461  
 
 462  
 
 463  
 /**
 464  
  * The ArgoUML editor.
 465  
  */
 466  
 class ArgoEditor extends Editor {
 467  
     private RenderingHints  argoRenderingHints;
 468  
 
 469  
     /**
 470  
      * Constructor for the Editor.
 471  
      *
 472  
      * @param d The Diagram that this editor works in.
 473  
      */
 474  
     public ArgoEditor(Diagram d) {
 475  0
         super(d);
 476  0
         setupRenderingHints();
 477  0
     }
 478  
 
 479  
     /**
 480  
      * Constructor for the Editor.
 481  
      *
 482  
      * @param gm The Graphmodel.
 483  
      * @param c The component.
 484  
      */
 485  
     public ArgoEditor(GraphModel gm, JComponent c) {
 486  0
         super(gm, c);
 487  0
         setupRenderingHints();
 488  0
     }
 489  
 
 490  
     /*
 491  
      * @see java.awt.event.MouseListener#mouseEntered(java.awt.event.MouseEvent)
 492  
      */
 493  
     @Override
 494  
     public void mouseEntered(MouseEvent me) {
 495  0
         if (getActiveTextEditor() != null) {
 496  0
             getActiveTextEditor().requestFocus();
 497  
         }
 498  0
         translateMouseEvent(me);
 499  0
         Globals.curEditor(this);
 500  0
         pushMode((FigModifyingMode) Globals.mode());
 501  0
         setUnderMouse(me);
 502  0
         _modeManager.mouseEntered(me);
 503  0
     }
 504  
 
 505  
     /*
 506  
      * @see java.awt.event.MouseMotionListener#mouseMoved(java.awt.event.MouseEvent)
 507  
      */
 508  
     @Override
 509  
     public void mouseMoved(MouseEvent me) {
 510  
         //- RedrawManager.lock();
 511  0
         translateMouseEvent(me);
 512  0
         Globals.curEditor(this);
 513  0
         setUnderMouse(me);
 514  0
         Fig currentFig = getCurrentFig();
 515  0
         if (currentFig != null && Globals.getShowFigTips()) {
 516  0
             String tip = currentFig.getTipString(me);
 517  0
             if (tip != null && (getJComponent() != null)) {
 518  0
                 JComponent c = getJComponent();
 519  0
                 if (c.getToolTipText() == null
 520  
                     || !(c.getToolTipText().equals(tip))) {
 521  0
                     c.setToolTipText(tip);
 522  
                 }
 523  
             }
 524  0
         } else if (getJComponent() != null
 525  
                    && getJComponent().getToolTipText() != null) {
 526  0
             getJComponent().setToolTipText(null); //was ""
 527  
         }
 528  
 
 529  0
         _selectionManager.mouseMoved(me);
 530  0
         _modeManager.mouseMoved(me);
 531  
         //- RedrawManager.unlock();
 532  
         //- _redrawer.repairDamage();
 533  0
     }
 534  
 
 535  
     /*
 536  
      * Overridden to set Argo-specific RenderingHints to determine whether
 537  
      * or not antialiasing should be turned on.
 538  
      *
 539  
      * @see org.tigris.gef.base.Editor#paint(java.awt.Graphics)
 540  
      */
 541  
     @Override
 542  
     public synchronized void paint(Graphics g) {
 543  0
         if (!shouldPaint()) {
 544  0
             return;
 545  
         }
 546  
 
 547  0
         if (g instanceof Graphics2D) {
 548  0
             Graphics2D g2 = (Graphics2D) g;
 549  0
             g2.setRenderingHints(argoRenderingHints);
 550  0
             double scale = getScale();
 551  0
             g2.scale(scale, scale);
 552  
         }
 553  0
         getLayerManager().paint(g);
 554  
         //getLayerManager().getActiveLayer().paint(g);
 555  0
         if (_canSelectElements) {
 556  0
             _selectionManager.paint(g);
 557  0
             _modeManager.paint(g);
 558  
         }
 559  0
     }
 560  
 
 561  
     /**
 562  
      * Construct a new set of RenderingHints to reflect current user
 563  
      * settings.
 564  
      */
 565  
     private void setupRenderingHints() {
 566  0
         argoRenderingHints = new RenderingHints(null);
 567  
 
 568  0
         argoRenderingHints.put(RenderingHints.KEY_FRACTIONALMETRICS,
 569  
             RenderingHints.VALUE_FRACTIONALMETRICS_ON);
 570  
 
 571  0
         if (Configuration.getBoolean(Argo.KEY_SMOOTH_EDGES, false)) {
 572  0
             argoRenderingHints.put(RenderingHints.KEY_RENDERING,
 573  
                 RenderingHints.VALUE_RENDER_QUALITY);
 574  0
             argoRenderingHints.put(RenderingHints.KEY_ANTIALIASING,
 575  
                 RenderingHints.VALUE_ANTIALIAS_ON);
 576  0
             argoRenderingHints.put(RenderingHints.KEY_TEXT_ANTIALIASING,
 577  
                 RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
 578  
         } else {
 579  0
             argoRenderingHints.put(RenderingHints.KEY_RENDERING,
 580  
                 RenderingHints.VALUE_RENDER_SPEED);
 581  0
             argoRenderingHints.put(RenderingHints.KEY_ANTIALIASING,
 582  
                 RenderingHints.VALUE_ANTIALIAS_OFF);
 583  0
             argoRenderingHints.put(RenderingHints.KEY_TEXT_ANTIALIASING,
 584  
                 RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);
 585  
         }
 586  0
     }
 587  
 
 588  
     /**
 589  
      * The UID.
 590  
      */
 591  
     private static final long serialVersionUID = -799007144549997407L;
 592  
 }