[richfaces-svn-commits] JBoss Rich Faces SVN: r15811 - root/framework/trunk/impl/src/main/java/org/richfaces/resource.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Mon Nov 2 08:12:54 EST 2009


Author: Alex.Kolonitsky
Date: 2009-11-02 08:12:53 -0500 (Mon, 02 Nov 2009)
New Revision: 15811

Modified:
   root/framework/trunk/impl/src/main/java/org/richfaces/resource/TestResource2.java
Log:
Code style policy
https://jira.jboss.org/jira/browse/RFPL-195

Modified: root/framework/trunk/impl/src/main/java/org/richfaces/resource/TestResource2.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/richfaces/resource/TestResource2.java	2009-11-02 13:05:00 UTC (rev 15810)
+++ root/framework/trunk/impl/src/main/java/org/richfaces/resource/TestResource2.java	2009-11-02 13:12:53 UTC (rev 15811)
@@ -40,60 +40,60 @@
 
     private static final int MASK_FOR_COLOR_WITHOUT_ALPHA_CHANNEL = 0x00FFFFFF;
 
-	private Color color;
-	
+    private Color color;
+
     private Dimension dimension = new Dimension(20, 150);
 
     public TestResource2() {
-		super(ImageType.PNG);
-		FacesContext context = FacesContext.getCurrentInstance();
-		Skin skin = SkinFactory.getInstance().getSkin(context);
-		Object parameter = skin.getParameter(context, Skin.HEADER_GRADIENT_COLOR);
-		this.color = HtmlColor.decode(parameter.toString());
-	}
-	
-	@Override
-	protected void paint(Graphics2D graphics2d, Dimension dim) {
-		super.paint(graphics2d, dim);
-		
-		graphics2d.setPaint(new GradientPaint(0, 0, Color.WHITE, dim.width, dim.height, color));
-		graphics2d.fillRect(0, 0, dim.width, dim.height);
-	}
+        super(ImageType.PNG);
+        FacesContext context = FacesContext.getCurrentInstance();
+        Skin skin = SkinFactory.getInstance().getSkin(context);
+        Object parameter = skin.getParameter(context, Skin.HEADER_GRADIENT_COLOR);
+        this.color = HtmlColor.decode(parameter.toString());
+    }
 
-	@Override
-	protected void readState(FacesContext context, NumericDataInputStream stream) {
-		super.readState(context, stream);
-		this.color = stream.readColor();
-	}
-	
-	@Override
-	protected void writeState(FacesContext context,
-			NumericDataOutputStream stream) {
-		super.writeState(context, stream);
-		stream.writeColor(this.color);
-	}
-	
-	@Override
-	public String getEntityTag(FacesContext context) {
-		return ResourceUtils.formatWeakTag(getColorWitoutAlphaChanel());
-	}
+    @Override
+    protected void paint(Graphics2D graphics2d, Dimension dim) {
+        super.paint(graphics2d, dim);
 
+        graphics2d.setPaint(new GradientPaint(0, 0, Color.WHITE, dim.width, dim.height, color));
+        graphics2d.fillRect(0, 0, dim.width, dim.height);
+    }
+
+    @Override
+    protected void readState(FacesContext context, NumericDataInputStream stream) {
+        super.readState(context, stream);
+        this.color = stream.readColor();
+    }
+
+    @Override
+    protected void writeState(FacesContext context,
+                              NumericDataOutputStream stream) {
+        super.writeState(context, stream);
+        stream.writeColor(this.color);
+    }
+
+    @Override
+    public String getEntityTag(FacesContext context) {
+        return ResourceUtils.formatWeakTag(getColorWitoutAlphaChanel());
+    }
+
     private String getColorWitoutAlphaChanel() {
         return Integer.toHexString(color.getRGB() & MASK_FOR_COLOR_WITHOUT_ALPHA_CHANNEL);
     }
 
     @Override
-	public String getVersion() {
-		return VersionBean._version.getResourceVersion();
-	}
+    public String getVersion() {
+        return VersionBean.VERSION.getResourceVersion();
+    }
 
-	/* (non-Javadoc)
-	 * @see org.ajax4jsf.resource.Java2Dresource#getDimension()
-	 */
-	@Override
-	public Dimension getDimension() {
-		return dimension;
-	}
+    /* (non-Javadoc)
+      * @see org.ajax4jsf.resource.Java2Dresource#getDimension()
+      */
+    @Override
+    public Dimension getDimension() {
+        return dimension;
+    }
 
     public Color getColor() {
         return color;



More information about the richfaces-svn-commits mailing list