skin: modified indenting 35/12335/1
authorGiWoong Kim <giwoong.kim@samsung.com>
Wed, 13 Nov 2013 10:09:24 +0000 (19:09 +0900)
committerGiWoong Kim <giwoong.kim@samsung.com>
Wed, 13 Nov 2013 10:09:24 +0000 (19:09 +0900)
1. modified indenting
2. added boilerplate title

Change-Id: Ibe9fa409dfd39c56dc558ba25374221dce432dec
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
12 files changed:
tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorShutdownhook.java
tizen/src/skin/client/src/org/tizen/emulator/skin/comm/sock/data/AbstractSendData.java
tizen/src/skin/client/src/org/tizen/emulator/skin/comm/sock/data/BooleanData.java
tizen/src/skin/client/src/org/tizen/emulator/skin/comm/sock/data/DisplayStateData.java
tizen/src/skin/client/src/org/tizen/emulator/skin/comm/sock/data/KeyEventData.java
tizen/src/skin/client/src/org/tizen/emulator/skin/comm/sock/data/MouseEventData.java
tizen/src/skin/client/src/org/tizen/emulator/skin/comm/sock/data/StartData.java
tizen/src/skin/client/src/org/tizen/emulator/skin/config/EmulatorConfig.java
tizen/src/skin/client/src/org/tizen/emulator/skin/util/JaxbUtil.java
tizen/src/skin/client/src/org/tizen/emulator/skin/util/SkinRotation.java
tizen/src/skin/client/src/org/tizen/emulator/skin/util/StringUtil.java
tizen/src/skin/client/src/org/tizen/emulator/skin/util/SwtUtil.java

index 787e7e4..fd5814d 100644 (file)
@@ -1,7 +1,7 @@
 /**
- * 
+ * Shutdown Hook
  *
- * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (C) 2011 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
  *
  * Contact:
  * GiWoong Kim <giwoong.kim@samsung.com>
@@ -53,5 +53,4 @@ public class EmulatorShutdownhook extends Thread {
                logger.info("EmulatorShutdownhook run by a signal.");
                communicator.terminate();
        }
-       
 }
index 896bf47..4388165 100644 (file)
@@ -1,7 +1,7 @@
 /**
- * 
+ * Abstract Data
  *
- * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (C) 2011 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
  *
  * Contact:
  * GiWoong Kim <giwoong.kim@samsung.com>
@@ -38,41 +38,39 @@ import java.io.IOException;
  *
  */
 public abstract class AbstractSendData implements ISendData {
-       
        private DataOutputStream dos;
        private ByteArrayOutputStream bao;
        
        public AbstractSendData() {
                bao = new ByteArrayOutputStream();
-               dos = new DataOutputStream( bao );
+               dos = new DataOutputStream(bao);
        }
-       
+
        protected abstract void write() throws IOException ;
-       
+
        @Override
        public byte[] serialize() throws IOException {
                write();
                return bao.toByteArray();
        }
 
-       protected void writeShort ( int val ) throws IOException {
-               dos.writeShort( val );
+       protected void writeShort(int val) throws IOException {
+               dos.writeShort(val);
        }
 
-       protected void writeInt ( int val ) throws IOException {
-               dos.writeInt( val );
+       protected void writeInt(int val) throws IOException {
+               dos.writeInt(val);
        }
 
-       protected void writeLong ( long val ) throws IOException {
-               dos.writeLong( val );
+       protected void writeLong(long val) throws IOException {
+               dos.writeLong(val);
        }
 
-       protected void writeBoolean ( boolean val ) throws IOException {
-               dos.writeBoolean( val );
+       protected void writeBoolean(boolean val) throws IOException {
+               dos.writeBoolean(val);
        }
 
-       protected void writeChar ( char val ) throws IOException {
-               dos.writeChar( val );
+       protected void writeChar(char val) throws IOException {
+               dos.writeChar(val);
        }
-
 }
index 1a48af1..bb2773a 100644 (file)
@@ -1,7 +1,7 @@
 /**
- * 
+ * Boolean Data
  *
- * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (C) 2011 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
  *
  * Contact:
  * GiWoong Kim <giwoong.kim@samsung.com>
@@ -36,15 +36,14 @@ import java.io.IOException;
  *
  */
 public class BooleanData extends AbstractSendData {
-
        private boolean booleanValue;
        private String dataName;
        
-       public BooleanData( boolean booleanValue ) {
+       public BooleanData(boolean booleanValue) {
                this.booleanValue = booleanValue;
        }
 
-       public BooleanData( boolean booleanValue, String dataName) {
+       public BooleanData(boolean booleanValue, String dataName) {
                this.booleanValue = booleanValue;
                this.dataName = dataName;
        }
@@ -54,18 +53,18 @@ public class BooleanData extends AbstractSendData {
         */
        @Override
        protected void write() throws IOException {
-               writeBoolean( booleanValue );
+               writeBoolean(booleanValue);
        }
 
        @Override
        public String toString() {
                StringBuilder builder = new StringBuilder();
-               builder.append( "BooleanData [booleanValue=" );
-               builder.append( booleanValue );
-               builder.append( ", dataName=" );
-               builder.append( dataName );
-               builder.append( "]" );
+               builder.append("BooleanData [booleanValue=");
+               builder.append(booleanValue);
+               builder.append(", dataName=");
+               builder.append(dataName);
+               builder.append("]");
+
                return builder.toString();
        }
-
 }
index a22ef4d..447e2af 100644 (file)
@@ -1,7 +1,7 @@
 /**
- * 
+ * Display State Data
  *
- * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (C) 2011 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
  *
  * Contact:
  * GiWoong Kim <giwoong.kim@samsung.com>
@@ -36,10 +36,9 @@ import java.io.IOException;
  *
  */
 public class DisplayStateData extends AbstractSendData {
-       
        int scale;
        short rotation;
-       
+
        public DisplayStateData(int scale, short rotation) {
                this.scale = scale;
                this.rotation = rotation;
@@ -59,7 +58,7 @@ public class DisplayStateData extends AbstractSendData {
                builder.append(", rotation=");
                builder.append(rotation);
                builder.append("]");
+
                return builder.toString();
        }
-
 }
index a6656e7..e3b284c 100644 (file)
@@ -1,7 +1,7 @@
 /**
- * 
+ * Key Event Data
  *
- * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (C) 2011 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
  *
  * Contact:
  * GiWoong Kim <giwoong.kim@samsung.com>
@@ -36,7 +36,6 @@ import java.io.IOException;
  *
  */
 public class KeyEventData extends AbstractSendData {
-
        public int eventType;
        public int keycode;
        public int stateMask;
@@ -48,7 +47,7 @@ public class KeyEventData extends AbstractSendData {
                this.stateMask = stateMask;
                this.keyLocation = keyLocation;
        }
-       
+
        @Override
        protected void write() throws IOException {
                writeInt(eventType);
@@ -56,7 +55,7 @@ public class KeyEventData extends AbstractSendData {
                writeInt(stateMask);
                writeInt(keyLocation);
        }
-       
+
        @Override
        public String toString() {
                StringBuilder builder = new StringBuilder();
@@ -69,7 +68,7 @@ public class KeyEventData extends AbstractSendData {
                builder.append(", keyLocation=");
                builder.append(keyLocation);
                builder.append("]");
+
                return builder.toString();
        }
-       
 }
index 268f606..055bdd7 100644 (file)
@@ -1,7 +1,7 @@
 /**
- * 
+ * Mouse Event Data
  *
- * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (C) 2011 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
  *
  * Contact:
  * GiWoong Kim <giwoong.kim@samsung.com>
@@ -36,7 +36,6 @@ import java.io.IOException;
  *
  */
 public class MouseEventData extends AbstractSendData {
-
        int mouseButton;
        int eventType;
        int hostX;
@@ -85,7 +84,7 @@ public class MouseEventData extends AbstractSendData {
                builder.append(", id=");
                builder.append(z);
                builder.append("]");
+
                return builder.toString();
        }
-
 }
index b87becb..3a270b3 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * initial data for Qemu
+ * Initial Data From Skin
  *
  * Copyright (C) 2011 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
  *
@@ -82,7 +82,7 @@ public class StartData extends AbstractSendData {
                builder.append(", blank guide=");
                builder.append(isBlankGuide);
                builder.append("]");
+
                return builder.toString();
        }
-
 }
index c6ae1bd..cd36ab6 100644 (file)
@@ -275,7 +275,7 @@ public class EmulatorConfig {
                }
 
                if (skinProperties.containsKey(
-                               SkinPropertiesConstants.WINDOW_Y ) == true) {
+                               SkinPropertiesConstants.WINDOW_Y) == true) {
                        String y = skinProperties.getProperty(SkinPropertiesConstants.WINDOW_Y);
                        int yy = 0;
 
index 2561692..8be268c 100644 (file)
@@ -1,7 +1,7 @@
 /**
- * 
+ * JAXB Utilities
  *
- * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (C) 2011 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
  *
  * Contact:
  * GiWoong Kim <giwoong.kim@samsung.com>
@@ -48,65 +48,56 @@ import org.tizen.emulator.skin.exception.JaxbException;
  *
  */
 public class JaxbUtil {
-       
-       private JaxbUtil(){}
+       private JaxbUtil() {
+               /* do nothing */
+       }
 
-       public static <T> T unmarshal( byte[] inputBytes, Class<T> clazz ) throws JaxbException {
-               return unmarshal( new ByteArrayInputStream( inputBytes ), clazz );
+       public static <T> T unmarshal(
+                       byte[] inputBytes, Class<T> clazz) throws JaxbException {
+               return unmarshal(new ByteArrayInputStream(inputBytes), clazz);
        }
 
-       public static <T> T unmarshal( InputStream in, Class<T> clazz ) throws JaxbException {
-               
-               try{
-                       
+       public static <T> T unmarshal(
+                       InputStream in, Class<T> clazz) throws JaxbException {
+               try {
                        Unmarshaller u = getContext(clazz).createUnmarshaller();
-                       JAXBElement<T> element = u.unmarshal( new StreamSource(in), clazz );
-                       
+                       JAXBElement<T> element = u.unmarshal(new StreamSource(in), clazz);
+
                        return element.getValue();
-                       
                } catch (JAXBException e) {
                        throw new JaxbException(e);
                } catch (Throwable e) {
                        throw new JaxbException(e);
                }
-               
        }
-       
-       public static void marshal( Object object, OutputStream out ) throws JaxbException {
-               
-               try{
-                       
+
+       public static void marshal(
+                       Object object, OutputStream out) throws JaxbException {
+               try {
                        Marshaller m = getContext(object.getClass()).createMarshaller();
-                       
+
                        m.setProperty(Marshaller.JAXB_ENCODING, "UTF-8");
                        m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
-                       
+
                        m.marshal(object, out);
-                       
                } catch (JAXBException e) {
                        throw new JaxbException(e);
                } catch (Throwable e) {
                        throw new JaxbException(e);
                }
-               
        }
-       
+
        private static JAXBContext getContext(Class<?> clazz) throws JaxbException {
-               
-               try{
-                       
+               try {
                        String qualifier = clazz.getCanonicalName();
                        int index = qualifier.lastIndexOf('.');
-                       if ( - 1!= index) {
-                               qualifier = qualifier.substring( 0, index );
+                       if (-1 != index) {
+                               qualifier = qualifier.substring(0, index);
                        }
-                       
-                       return JAXBContext.newInstance( qualifier, clazz.getClassLoader() );
-                       
+
+                       return JAXBContext.newInstance(qualifier, clazz.getClassLoader());
                } catch (JAXBException e) {
                        throw new JaxbException(e);
                }
-               
        }
-
 }
index be2f4b2..845581f 100644 (file)
@@ -1,7 +1,7 @@
 /**
- * 
+ * Rotation Utilities
  *
- * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (C) 2011 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
  *
  * Contact:
  * GiWoong Kim <giwoong.kim@samsung.com>
@@ -44,50 +44,59 @@ import org.tizen.emulator.skin.dbi.RotationType;
  *
  */
 public class SkinRotation {
-       
        private static Map<Short, RotationType> rotationMap;
        private static Map<Short, RotationInfo> angleMap;
-       
-       private SkinRotation(){}
-       
+
+       private SkinRotation() {
+               /* do nothing */
+       }
+
        static {
                rotationMap = new LinkedHashMap<Short, RotationType>();
                angleMap = new HashMap<Short, RotationInfo>();
        }
-       
-       public static void put(RotationType rotation ) {
 
-               if ( RotationInfo.PORTRAIT.value().equalsIgnoreCase( rotation.getName().value() ) ) {
-                       rotationMap.put( RotationInfo.PORTRAIT.id(), rotation );
-                       angleMap.put( RotationInfo.PORTRAIT.id(), RotationInfo.PORTRAIT );
-               } else if ( RotationInfo.LANDSCAPE.value().equalsIgnoreCase( rotation.getName().value() ) ) {
-                       rotationMap.put( RotationInfo.LANDSCAPE.id(), rotation );
-                       angleMap.put( RotationInfo.LANDSCAPE.id(), RotationInfo.LANDSCAPE );
-               } else if ( RotationInfo.REVERSE_PORTRAIT.value().equalsIgnoreCase( rotation.getName().value() ) ) {
-                       rotationMap.put( RotationInfo.REVERSE_PORTRAIT.id(), rotation );
-                       angleMap.put( RotationInfo.REVERSE_PORTRAIT.id(), RotationInfo.REVERSE_PORTRAIT );
-               } else if ( RotationInfo.REVERSE_LANDSCAPE.value().equalsIgnoreCase( rotation.getName().value() ) ) {
-                       rotationMap.put( RotationInfo.REVERSE_LANDSCAPE.id(), rotation );
-                       angleMap.put( RotationInfo.REVERSE_LANDSCAPE.id(), RotationInfo.REVERSE_LANDSCAPE );
+       public static void put(RotationType rotation) {
+               if (RotationInfo.PORTRAIT.value()
+                               .equalsIgnoreCase(rotation.getName().value()))
+               {
+                       rotationMap.put(RotationInfo.PORTRAIT.id(), rotation);
+                       angleMap.put(RotationInfo.PORTRAIT.id(), RotationInfo.PORTRAIT);
+               }
+               else if (RotationInfo.LANDSCAPE.value()
+                               .equalsIgnoreCase(rotation.getName().value()))
+               {
+                       rotationMap.put(RotationInfo.LANDSCAPE.id(), rotation);
+                       angleMap.put(RotationInfo.LANDSCAPE.id(), RotationInfo.LANDSCAPE);
+               }
+               else if (RotationInfo.REVERSE_PORTRAIT.value()
+                               .equalsIgnoreCase(rotation.getName().value()))
+               {
+                       rotationMap.put(RotationInfo.REVERSE_PORTRAIT.id(), rotation);
+                       angleMap.put(RotationInfo.REVERSE_PORTRAIT.id(), RotationInfo.REVERSE_PORTRAIT);
+               }
+               else if (RotationInfo.REVERSE_LANDSCAPE.value()
+                               .equalsIgnoreCase(rotation.getName().value()))
+               {
+                       rotationMap.put(RotationInfo.REVERSE_LANDSCAPE.id(), rotation);
+                       angleMap.put(RotationInfo.REVERSE_LANDSCAPE.id(), RotationInfo.REVERSE_LANDSCAPE);
                }
-
        }
 
-       public static int getAngle( Short rotationId ) {
+       public static int getAngle(Short rotationId) {
                RotationInfo rotationInfo = angleMap.get(rotationId);
-               if( null != rotationInfo ) {
+               if (null != rotationInfo) {
                        return rotationInfo.angle();
-               }else {
+               } else {
                        return 0;
                }
        }
 
-       public static RotationType getRotation( Short rotationId ) {
+       public static RotationType getRotation(Short rotationId) {
                return rotationMap.get(rotationId);
        }
 
-       public static Iterator<Entry<Short, RotationType>>getRotationIterator() {
+       public static Iterator<Entry<Short, RotationType>> getRotationIterator() {
                return rotationMap.entrySet().iterator();
        }
-       
 }
index 38566fe..d4e4c77 100644 (file)
@@ -1,7 +1,7 @@
 /**
- * 
+ * String Utilities
  *
- * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (C) 2011 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
  *
  * Contact:
  * GiWoong Kim <giwoong.kim@samsung.com>
index 0435f30..2b3e9aa 100644 (file)
@@ -1,7 +1,7 @@
 /**
- * 
+ * SWT Utilities
  *
- * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (C) 2011 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
  *
  * Contact:
  * GiWoong Kim <giwoong.kim@samsung.com>
@@ -37,17 +37,18 @@ import org.eclipse.swt.SWT;
  */
 public class SwtUtil {
        private SwtUtil() {
+               /* do nothing */
        }
 
        public static boolean isLinuxPlatform() {
-               return "gtk".equalsIgnoreCase( SWT.getPlatform() );
+               return "gtk".equalsIgnoreCase(SWT.getPlatform());
        }
 
        public static boolean isWindowsPlatform() {
-               return "win32".equalsIgnoreCase( SWT.getPlatform() ); //win32-win32-x86_64
+               return "win32".equalsIgnoreCase(SWT.getPlatform()); /* win32-win32-x86_64 */
        }
 
        public static boolean isMacPlatform() {
-               return "cocoa".equalsIgnoreCase( SWT.getPlatform() );
+               return "cocoa".equalsIgnoreCase(SWT.getPlatform());
        }
 }