OSDN Git Service

キャスト後のスペース追加
authorOlyutorskii <olyutorskii@users.osdn.me>
Fri, 17 Jun 2016 17:19:16 +0000 (02:19 +0900)
committerOlyutorskii <olyutorskii@users.osdn.me>
Fri, 17 Jun 2016 17:19:16 +0000 (02:19 +0900)
15 files changed:
src/main/java/jp/sfjp/jindolf/Controller.java
src/main/java/jp/sfjp/jindolf/data/LandsModel.java
src/main/java/jp/sfjp/jindolf/data/RegexPattern.java
src/main/java/jp/sfjp/jindolf/dxchg/CsvExporter.java
src/main/java/jp/sfjp/jindolf/dxchg/UriExporter.java
src/main/java/jp/sfjp/jindolf/dxchg/WebIPCDialog.java
src/main/java/jp/sfjp/jindolf/glyph/Discussion.java
src/main/java/jp/sfjp/jindolf/glyph/Font2Json.java
src/main/java/jp/sfjp/jindolf/glyph/FontInfo.java
src/main/java/jp/sfjp/jindolf/log/SwingDocHandler.java
src/main/java/jp/sfjp/jindolf/net/HttpUtils.java
src/main/java/jp/sfjp/jindolf/net/ProxyChooser.java
src/main/java/jp/sfjp/jindolf/summary/DaySummary.java
src/main/java/jp/sfjp/jindolf/view/AccountPanel.java
src/main/java/jp/sfjp/jindolf/view/WindowManager.java

index 6dab8ad..e639765 100644 (file)
@@ -549,7 +549,7 @@ public class Controller
 
         final LookAndFeel lnf;
         try{
-            lnf = (LookAndFeel)( lnfClass.newInstance() );
+            lnf = (LookAndFeel) ( lnfClass.newInstance() );
         }catch(InstantiationException e){
             String warnMsg = MessageFormat.format(ERRFORM_LAF, className);
             warnDialog(ERRTITLE_LAF, warnMsg, e);
@@ -1463,13 +1463,13 @@ public class Controller
         Object selObj = path.getLastPathComponent();
 
         if( selObj instanceof Land ){
-            Land land = (Land)selObj;
+            Land land = (Land) selObj;
             setFrameTitle(land.getLandDef().getLandName());
             this.topView.showLandInfo(land);
             this.actionManager.appearVillage(false);
             this.actionManager.appearPeriod(false);
         }else if( selObj instanceof Village ){
-            final Village village = (Village)selObj;
+            final Village village = (Village) selObj;
 
             Executor executor = Executors.newCachedThreadPool();
             executor.execute(new Runnable(){
index 0bb8c3d..9a3805d 100644 (file)
@@ -228,7 +228,7 @@ public class LandsModel implements TreeModel{ // ComboBoxModelも付けるか?
             return land;
         }
         if(parent instanceof Land){
-            Land land = (Land)parent;
+            Land land = (Land) parent;
             List<VillageSection> sectionList = this.sectionMap.get(land);
             int sectIndex = index;
             if( ! this.ascending) sectIndex = sectionList.size() - index - 1;
@@ -236,7 +236,7 @@ public class LandsModel implements TreeModel{ // ComboBoxModelも付けるか?
             return section;
         }
         if(parent instanceof VillageSection){
-            VillageSection section = (VillageSection)parent;
+            VillageSection section = (VillageSection) parent;
             int vilIndex = index;
             if( ! this.ascending){
                 vilIndex = section.getVillageCount() - index - 1;
@@ -258,13 +258,13 @@ public class LandsModel implements TreeModel{ // ComboBoxModelも付けるか?
             return getLandList().size();
         }
         if(parent instanceof Land){
-            Land land = (Land)parent;
+            Land land = (Land) parent;
             List<VillageSection> sectionList = this.sectionMap.get(land);
             if(sectionList == null) return 0;
             return sectionList.size();
         }
         if(parent instanceof VillageSection){
-            VillageSection section = (VillageSection)parent;
+            VillageSection section = (VillageSection) parent;
             return section.getVillageCount();
         }
         return 0;
@@ -286,14 +286,14 @@ public class LandsModel implements TreeModel{ // ComboBoxModelも付けるか?
             return index;
         }
         if(parent instanceof Land){
-            Land land = (Land)parent;
+            Land land = (Land) parent;
             List<VillageSection> sectionList = this.sectionMap.get(land);
             int index = sectionList.indexOf(child);
             if( ! this.ascending) index = sectionList.size() - index - 1;
             return index;
         }
         if(parent instanceof VillageSection){
-            VillageSection section = (VillageSection)parent;
+            VillageSection section = (VillageSection) parent;
             int index = section.getIndexOfVillage(child);
             if( ! this.ascending){
                 index = section.getVillageCount() - index - 1;
index 92bc75b..845f34c 100644 (file)
@@ -166,7 +166,7 @@ public class RegexPattern{
         String source;
         value = object.getValue("source");
         if(value instanceof JsString){
-            source = ((JsString)value).toRawString();
+            source = ((JsString) value).toRawString();
         }else{
             source = "";
         }
@@ -174,7 +174,7 @@ public class RegexPattern{
         boolean isRegex;
         value = object.getValue("isRegex");
         if(value instanceof JsBoolean){
-            isRegex = ((JsBoolean)value).booleanValue();
+            isRegex = ((JsBoolean) value).booleanValue();
         }else{
             isRegex = false;
         }
@@ -182,19 +182,19 @@ public class RegexPattern{
         int regexFlag = 0x00000000;
         value = object.getValue("dotall");
         if(value instanceof JsBoolean){
-            if(((JsBoolean)value).isTrue()){
+            if(((JsBoolean) value).isTrue()){
                 regexFlag |= Pattern.DOTALL;
             }
         }
         value = object.getValue("multiline");
         if(value instanceof JsBoolean){
-            if(((JsBoolean)value).isTrue()){
+            if(((JsBoolean) value).isTrue()){
                 regexFlag |= Pattern.MULTILINE;
             }
         }
         value = object.getValue("ignorecase");
         if(value instanceof JsBoolean){
-            if(((JsBoolean)value).isTrue()){
+            if(((JsBoolean) value).isTrue()){
                 regexFlag |= IGNORECASEFLAG;
             }
         }
@@ -202,7 +202,7 @@ public class RegexPattern{
         String comment;
         value = object.getValue("comment");
         if(value instanceof JsString){
-            comment = ((JsString)value).toRawString();
+            comment = ((JsString) value).toRawString();
         }else{
             comment = "";
         }
index 2110ca4..3578574 100644 (file)
@@ -410,7 +410,7 @@ public final class CsvExporter{
         }
         os = new BufferedOutputStream(os, BUFSIZ);
 
-        Charset cs = (Charset)( encodeBox.getSelectedItem() );
+        Charset cs = (Charset) ( encodeBox.getSelectedItem() );
 
         boolean hasIOError = false;
         Writer writer = new OutputStreamWriter(os, cs);
index a992f31..f479d4a 100644 (file)
@@ -65,7 +65,7 @@ public class UriExporter implements Transferable{
         int index = 0;
         for(DataFlavor dataFlavor : URI_FLAVORS){
             try{
-                result[index++] = (DataFlavor)( dataFlavor.clone() );
+                result[index++] = (DataFlavor) ( dataFlavor.clone() );
             }catch(CloneNotSupportedException e){
                 assert false;
                 throw new AssertionError(e);
index d567319..cb8e7b5 100644 (file)
@@ -465,7 +465,7 @@ public class WebIPCDialog
          */
         @Override
         public void mousePressed(MouseEvent event){
-            JComponent comp = (JComponent)event.getSource();
+            JComponent comp = (JComponent) event.getSource();
             TransferHandler handler = comp.getTransferHandler();
             handler.exportAsDrag(comp, event, TransferHandler.COPY);
             return;
index 95ae6f0..d70b6f8 100644 (file)
@@ -518,9 +518,9 @@ public class Discussion extends JComponent
 
         Topic topic;
         if(row instanceof TalkDraw){
-            topic = ((TalkDraw)row).getTalk();
+            topic = ((TalkDraw) row).getTalk();
         }else if(row instanceof SysEventDraw){
-            topic = ((SysEventDraw)row).getSysEvent();
+            topic = ((SysEventDraw) row).getSysEvent();
         }else{
             return false;
         }
index af55df3..e5c5129 100644 (file)
@@ -112,7 +112,7 @@ public final class Font2Json {
             size = number.intValue();
         }
 
-        Font derivedFont = font.deriveFont(style, (float)size);
+        Font derivedFont = font.deriveFont(style, (float) size);
 
         return derivedFont;
     }
index 0bc15a9..a905be4 100644 (file)
@@ -56,7 +56,7 @@ public class FontInfo{
      * デフォルトフォントとそれに適した描画属性が指定される。
      */
     public FontInfo(){
-        this((Font)null, (FontRenderContext)null);
+        this((Font) null, (FontRenderContext) null);
         return;
     }
 
index 1eecac1..86eb6cd 100644 (file)
@@ -28,7 +28,7 @@ public class SwingDocHandler extends Handler{
 
     private static final int DOCLIMIT = 100 * 1000; // 単位は文字
     private static final float CHOPRATIO = 0.9f;
-    private static final int CHOPPEDLEN = (int)(DOCLIMIT * CHOPRATIO);
+    private static final int CHOPPEDLEN = (int) (DOCLIMIT * CHOPRATIO);
 
     static{
         assert DOCLIMIT > CHOPPEDLEN;
index 623339a..90ebdad 100644 (file)
@@ -59,8 +59,8 @@ public final class HttpUtils{
     public static String throughput(long size, long nano){
         if(size <= 0 || nano <= 0) return "";
 
-        double sec = ((double)nano) / (1000.0 * 1000.0 * 1000.0);
-        double rate = ((double)size) / sec;
+        double sec = ((double) nano) / (1000.0 * 1000.0 * 1000.0);
+        double rate = ((double) size) / sec;
 
         String unit = "";
         if(rate >= 1500.0){
index 68fdcdb..30b80e8 100644 (file)
@@ -86,7 +86,7 @@ public class ProxyChooser extends JPanel implements ItemListener{
         Component comp = editor.getEditorComponent();
         GUIUtils.addMargin(comp, 1, 4, 1, 4);
         if(comp instanceof JComponent){
-            ((JComponent)comp).setComponentPopupMenu(new TextPopup());
+            ((JComponent) comp).setComponentPopupMenu(new TextPopup());
         }
         Monodizer.monodize(this.port);
 
index 7693571..a42d5aa 100644 (file)
@@ -191,8 +191,11 @@ public class DaySummary extends JDialog
         String talks = talkCount + " 回";
 
         double average;
-        if(talkCount <= 0) average = 0.0;
-        else               average = (double)totalChars / (double)talkCount;
+        if(talkCount <= 0){
+            average = 0.0;
+        }else{
+            average = (double) totalChars / (double) talkCount;
+        }
         String chars = AVERAGE_FORM.format(average) + " 文字";
 
         Object[] row = {avatar, talks, chars, lastTime};
index ec46a0b..1c26d24 100644 (file)
@@ -218,7 +218,7 @@ public class AccountPanel
      * @return 現在選択中のLand
      */
     private Land getSelectedLand(){
-        Land land = (Land)( this.landBox.getSelectedItem() );
+        Land land = (Land) ( this.landBox.getSelectedItem() );
         return land;
     }
 
index 755b349..c865ed3 100644 (file)
@@ -406,7 +406,7 @@ public class WindowManager {
      */
     public static void updateTreeUI(Component comp, boolean isRoot) {
         if(comp instanceof JComponent){
-            JComponent jcomp = (JComponent)comp;
+            JComponent jcomp = (JComponent) comp;
             jcomp.updateUI();
 
             JPopupMenu popup = jcomp.getComponentPopupMenu();
@@ -416,12 +416,12 @@ public class WindowManager {
         }
 
         if(comp instanceof JMenu){
-            JMenu menu = (JMenu)comp;
+            JMenu menu = (JMenu) comp;
             for(Component child : menu.getMenuComponents()){
                 updateTreeUI(child, false);
             }
         }else if(comp instanceof Container){
-            Container cont = (Container)comp;
+            Container cont = (Container) comp;
             for(Component child : cont.getComponents()){
                 updateTreeUI(child, false);
             }