KickJava   Java API By Example, From Geeks To Geeks.

Java > Java SE, EE, ME > java > awt > RenderingHints

java.awt
Class RenderingHints

java.lang.Object
  extended by java.awt.RenderingHints
All Implemented Interfaces:
Cloneable, Map<Object,Object>
See Also:
Top Examples, Source Code, Raster, BufferedImageOp, Graphics2D

public void add(RenderingHints hints)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void clear()
See Also:
Object, Map
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[1340]An applet with slider bar
By sheeba_2008 { at } rediffmail { dot } com on 2005/03/11 04:54:00  Rate
 
  
  
  
 import java.awt.*; 
 import java.awt .event.*; 
 import javax.swing.*; 
 import javax.swing.event.*; 
  
  
  
 public class sld extends JApplet //implements ChangeListener 
    {  
     Container c; 
     int x1 = 300,y=100,x2=700,j,m; 
       int min=1,max=200,inv=30; 
       static int prev,nw=30; 
       JSlider s; 
  
  
       public void init (  )  
         {  
         c=getContentPane (  ) ; 
         s = new JSlider ( min,max,inv ) ; 
         c.setLayout ( new BorderLayout (  )  ) ; 
         c.add ( s,"South" ) ; 
         s.addChangeListener ( new A (  )  ) ; 
         s.setPaintTicks ( true ) ; 
         s.setSnapToTicks ( true ) ; 
         s.setMajorTickSpacing ( 30 ) ; 
         }  
  
  
           int i=500,jj=400,k=300,l=0; 
  
  
      public void start (  )  
        {  
        repaint (  ) ; 
        }  
  
  
  
      public void paint ( Graphics g )  
              {  
           if ( prev < nw&&x1 > =30&&x2 < =800 )  
              {  
            x1= ( x1-10 ) ;x2= ( x2+10 ) ; 
              g.drawLine ( x1,y,x2,y ) ; 
                    g.setColor ( Color.white ) ; 
                 }  
  
  
               if ( prev > nw && x1 > =30 && x2 < =800 )  
                   {  
                x1= ( x1+10 ) ; 
                x2= ( x2-10 ) ; 
                          g.ClearLine ( x1,x2 ) ; 
                          g.drawLine ( x1,y,x2,y ) ; 
  
  
  
                  }  
  
  
  
      }  
  
  
  
          class A implements ChangeListener 
              {  
            public void stateChanged ( ChangeEvent e )  
                  {  
                  s = ( JSlider ) e.getSource (  ) ; 
                  prev = nw; 
                  nw=s.getValue (  ) ; 
                  repaint (  ) ; 
                  }  
  
  
              }  
   } 


public Object clone()
See Also:
Cloneable
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public boolean containsKey(Object key)
See Also:
Map
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public boolean containsValue(Object value)
See Also:
Map
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Set<Map.Entry<Object,Object>> entrySet()
See Also:
Map
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public boolean equals(Object o)
See Also:
Hashtable, Object.hashCode(), Map
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Object get(Object key)
See Also:
put(Object, Object), Map
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public int hashCode()
See Also:
equals(Object), Object.equals(Object), Map
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public boolean isEmpty()
See Also:
Object, Map
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Set<Object> keySet()
See Also:
Map
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final RenderingHints.Key KEY_ALPHA_INTERPOLATION
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final RenderingHints.Key KEY_ANTIALIASING
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final RenderingHints.Key KEY_COLOR_RENDERING
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final RenderingHints.Key KEY_DITHERING
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final RenderingHints.Key KEY_FRACTIONALMETRICS
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final RenderingHints.Key KEY_INTERPOLATION
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final RenderingHints.Key KEY_RENDERING
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final RenderingHints.Key KEY_STROKE_CONTROL
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final RenderingHints.Key KEY_TEXT_ANTIALIASING
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Object put(Object key,
                  Object value)
See Also:
get(Object), Map, put
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void putAll(Map<?,?> m)
See Also:
Object
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Object remove(Object key)
See Also:
Map
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public RenderingHints(RenderingHints.Key key,
                      Object value)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public RenderingHints(Map<RenderingHints.Key,?> init)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public int size()
See Also:
Object, Map
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public String toString()
See Also:
Object
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Collection<Object> values()
See Also:
Map
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Object VALUE_ALPHA_INTERPOLATION_DEFAULT
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Object VALUE_ALPHA_INTERPOLATION_QUALITY
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Object VALUE_ALPHA_INTERPOLATION_SPEED
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Object VALUE_ANTIALIAS_DEFAULT
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Object VALUE_ANTIALIAS_OFF
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Object VALUE_ANTIALIAS_ON
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Object VALUE_COLOR_RENDER_DEFAULT
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Object VALUE_COLOR_RENDER_QUALITY
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Object VALUE_COLOR_RENDER_SPEED
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Object VALUE_DITHER_DEFAULT
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Object VALUE_DITHER_DISABLE
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Object VALUE_DITHER_ENABLE
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Object VALUE_FRACTIONALMETRICS_DEFAULT
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Object VALUE_FRACTIONALMETRICS_OFF
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Object VALUE_FRACTIONALMETRICS_ON
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Object VALUE_INTERPOLATION_BICUBIC
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Object VALUE_INTERPOLATION_BILINEAR
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Object VALUE_INTERPOLATION_NEAREST_NEIGHBOR
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Object VALUE_RENDER_DEFAULT
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Object VALUE_RENDER_QUALITY
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Object VALUE_RENDER_SPEED
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Object VALUE_STROKE_DEFAULT
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Object VALUE_STROKE_NORMALIZE
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Object VALUE_STROKE_PURE
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Object VALUE_TEXT_ANTIALIAS_DEFAULT
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Object VALUE_TEXT_ANTIALIAS_OFF
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Object VALUE_TEXT_ANTIALIAS_ON
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  

Popular Tags