javauis/m2g_qt/javasrc/javax/microedition/m2g/ScalableGraphics.java
changeset 87 1627c337e51e
parent 80 d6dafc5d983f
equal deleted inserted replaced
80:d6dafc5d983f 87:1627c337e51e
     1 /*
     1 /*
     2 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    40     /**
    40     /**
    41      *  Constructor
    41      *  Constructor
    42      */
    42      */
    43     private ScalableGraphics()
    43     private ScalableGraphics()
    44     {
    44     {
    45 				
       
    46         iSg = new M2GScalableGraphics();
    45         iSg = new M2GScalableGraphics();
    47         
       
    48     }
    46     }
    49 
    47 
    50     /**
    48     /**
    51      * Binds the given Graphics as the rendering target of this ScalableGraphics context. The
    49      * Binds the given Graphics as the rendering target of this ScalableGraphics context. The
    52      * type of the Graphics object depends on the Java profile that this specification is
    50      * type of the Graphics object depends on the Java profile that this specification is
    61      * @throws IllegalArgumentException if <code>target</code> is invalid.
    59      * @throws IllegalArgumentException if <code>target</code> is invalid.
    62      * @throws IllegalStateException if <code>target</code> is already bound.
    60      * @throws IllegalStateException if <code>target</code> is already bound.
    63      */
    61      */
    64     public void bindTarget(java.lang.Object target)
    62     public void bindTarget(java.lang.Object target)
    65     {
    63     {
    66     		
       
    67         iSg.bindTarget(target);
    64         iSg.bindTarget(target);
    68         
       
    69     }
    65     }
    70 
    66 
    71     /**
    67     /**
    72      * Retrieve a new instance of ScalableGraphics that can be associated to
    68      * Retrieve a new instance of ScalableGraphics that can be associated to
    73      * an application.
    69      * an application.
    85      * that was set in bindTarget. Otherwise, the image may or may not become visible.
    81      * that was set in bindTarget. Otherwise, the image may or may not become visible.
    86      * @throws IllegalStateException if <code>target</code> is not bound.
    82      * @throws IllegalStateException if <code>target</code> is not bound.
    87      */
    83      */
    88     public void releaseTarget()
    84     public void releaseTarget()
    89     {
    85     {
    90 				
       
    91         iSg.releaseTarget();
    86         iSg.releaseTarget();
    92      		
       
    93     }
    87     }
    94 
    88 
    95     /**
    89     /**
    96      * Renders the specified ScalableImage using the supplied anchor point. The anchor point given
    90      * Renders the specified ScalableImage using the supplied anchor point. The anchor point given
    97      * is relative to the upper left corner of the rendering surface. It is important to note that
    91      * is relative to the upper left corner of the rendering surface. It is important to note that
   104      * @throws IllegalStateException if <code>target</code> is not bound.
    98      * @throws IllegalStateException if <code>target</code> is not bound.
   105      * @see #releaseTarget
    99      * @see #releaseTarget
   106      */
   100      */
   107     public void render(int x, int y, ScalableImage image)
   101     public void render(int x, int y, ScalableImage image)
   108     {
   102     {
   109     		
       
   110         iSg.render(x,y, image);
   103         iSg.render(x,y, image);
   111         
       
   112     }
   104     }
   113 
   105 
   114     /**
   106     /**
   115      * Set the quality of rendering in the ScalableGraphics context. It can take one of the values,
   107      * Set the quality of rendering in the ScalableGraphics context. It can take one of the values,
   116      * RENDERING_QUALITY_LOW or RENDERING_QUALITY_HIGH. Default=RENDERING_QUALITY_HIGH. The
   108      * RENDERING_QUALITY_LOW or RENDERING_QUALITY_HIGH. Default=RENDERING_QUALITY_HIGH. The