From b8726eb432c014f5aba9e74a392b46a13990dd99 Mon Sep 17 00:00:00 2001 From: Shai Almog <67850168+shai-almog@users.noreply.github.com> Date: Thu, 29 Jan 2026 04:11:49 +0200 Subject: [PATCH] Fixed a few stray tabs and missing spaces for checkstyle --- .../com/codename1/components/MultiButton.java | 42 +++++------ .../codename1/components/SpanMultiButton.java | 42 +++++------ .../src/com/codename1/components/Switch.java | 10 ++- .../src/com/codename1/io/gzip/Deflate.java | 12 ++-- .../src/com/codename1/io/gzip/InfBlocks.java | 2 +- .../src/com/codename1/io/gzip/InfCodes.java | 4 +- .../src/com/codename1/io/gzip/InfTree.java | 8 +-- .../src/com/codename1/io/gzip/Inflate.java | 10 +-- .../codename1/processing/PrettyPrinter.java | 2 +- .../src/com/codename1/processing/Result.java | 26 +++---- .../codename1/processing/ResultTokenizer.java | 4 +- CodenameOne/src/com/codename1/ui/Dialog.java | 2 +- CodenameOne/src/com/codename1/ui/Slider.java | 2 +- .../src/com/codename1/ui/TextArea.java | 2 +- .../ui/animations/FlipTransition.java | 4 +- .../com/codename1/ui/geom/GeneralPath.java | 8 +-- .../src/com/codename1/ui/html/CSSElement.java | 12 ++-- .../com/codename1/ui/html/CellConstraint.java | 4 +- .../com/codename1/ui/html/HTMLComponent.java | 26 +++---- .../com/codename1/ui/html/HTMLElement.java | 6 +- .../src/com/codename1/ui/layouts/mig/AC.java | 56 +++++++-------- .../mig/CodenameOneMiGComponentWrapper.java | 54 +++++++------- .../mig/CodenameOneMiGContainerWrapper.java | 12 ++-- .../ui/layouts/mig/ComponentWrapper.java | 2 +- .../ui/layouts/mig/ConstraintParser.java | 70 +++++++++---------- .../com/codename1/ui/layouts/mig/Grid.java | 10 +-- .../ui/layouts/mig/InCellGapProvider.java | 2 +- .../codename1/ui/layouts/mig/LayoutUtil.java | 40 +++++------ .../ui/layouts/mig/PlatformDefaults.java | 30 ++++---- .../src/com/codename1/ui/list/MultiList.java | 28 ++++---- .../codename1/ui/plaf/DefaultLookAndFeel.java | 4 +- .../codename1/ui/scene/PerspectiveCamera.java | 2 +- .../com/codename1/ui/spinner/Spinner3D.java | 2 +- 33 files changed, 269 insertions(+), 271 deletions(-) diff --git a/CodenameOne/src/com/codename1/components/MultiButton.java b/CodenameOne/src/com/codename1/components/MultiButton.java index e315669ccd..9fa087f2c8 100644 --- a/CodenameOne/src/com/codename1/components/MultiButton.java +++ b/CodenameOne/src/com/codename1/components/MultiButton.java @@ -971,31 +971,31 @@ public String[] getPropertyNames() { @Override public Class[] getPropertyTypes() { return new Class[]{ - String.class,// line1 - String.class,// line2 - String.class,// line3 - String.class,// line4 - String.class,// name1 - String.class,// name2 - String.class,// name3 - String.class,// name4 - String.class,// uiid1 - String.class,// uiid2 - String.class,// uiid3 - String.class,// uiid4 - Image.class,// icon - String.class,// iconName - String.class,// iconUiid - String.class,// iconPosition - Image.class,// emblem - String.class,// emblemName - String.class,// emblemUiid - String.class,// emblemPosition + String.class, // line1 + String.class, // line2 + String.class, // line3 + String.class, // line4 + String.class, // name1 + String.class, // name2 + String.class, // name3 + String.class, // name4 + String.class, // uiid1 + String.class, // uiid2 + String.class, // uiid3 + String.class, // uiid4 + Image.class, // icon + String.class, // iconName + String.class, // iconUiid + String.class, // iconPosition + Image.class, // emblem + String.class, // emblemName + String.class, // emblemUiid + String.class, // emblemPosition Boolean.class, Boolean.class, Boolean.class, Boolean.class, - String.class,// group + String.class, // group Boolean.class, // selected String.class }; diff --git a/CodenameOne/src/com/codename1/components/SpanMultiButton.java b/CodenameOne/src/com/codename1/components/SpanMultiButton.java index 1419673295..93d9aa6e76 100644 --- a/CodenameOne/src/com/codename1/components/SpanMultiButton.java +++ b/CodenameOne/src/com/codename1/components/SpanMultiButton.java @@ -921,31 +921,31 @@ public String[] getPropertyNames() { @Override public Class[] getPropertyTypes() { return new Class[]{ - String.class,// line1 - String.class,// line2 - String.class,// line3 - String.class,// line4 - String.class,// name1 - String.class,// name2 - String.class,// name3 - String.class,// name4 - String.class,// uiid1 - String.class,// uiid2 - String.class,// uiid3 - String.class,// uiid4 - Image.class,// icon - String.class,// iconName - String.class,// iconUiid - String.class,// iconPosition - Image.class,// emblem - String.class,// emblemName - String.class,// emblemUiid - String.class,// emblemPosition + String.class, // line1 + String.class, // line2 + String.class, // line3 + String.class, // line4 + String.class, // name1 + String.class, // name2 + String.class, // name3 + String.class, // name4 + String.class, // uiid1 + String.class, // uiid2 + String.class, // uiid3 + String.class, // uiid4 + Image.class, // icon + String.class, // iconName + String.class, // iconUiid + String.class, // iconPosition + Image.class, // emblem + String.class, // emblemName + String.class, // emblemUiid + String.class, // emblemPosition Boolean.class, Boolean.class, Boolean.class, Boolean.class, - String.class,// group + String.class, // group Boolean.class, // selected String.class }; diff --git a/CodenameOne/src/com/codename1/components/Switch.java b/CodenameOne/src/com/codename1/components/Switch.java index 30bda0ea48..b2fac91a82 100644 --- a/CodenameOne/src/com/codename1/components/Switch.java +++ b/CodenameOne/src/com/codename1/components/Switch.java @@ -365,7 +365,7 @@ private static int getAlignedCoord(int coord, int parentDim, int elemDim, int al case Component.BOTTOM: return coord + parentDim - elemDim; //case Component.LEFT: case Component.TOP: - // return coord; + // return coord; default: return coord; } @@ -749,7 +749,7 @@ public void paint(Graphics g) { } Style s = getStyle(); - int padLeft = s.getPaddingLeft(isRTL());//s.getPaddingLeftNoRTL(); + int padLeft = s.getPaddingLeft(isRTL()); //s.getPaddingLeftNoRTL(); int padRight = s.getPaddingRight(isRTL()); int padTop = s.getPaddingTop(); int padBot = s.getPaddingBottom(); @@ -991,8 +991,7 @@ public void setOff() { */ @Override public String[] getPropertyNames() { - return new String[]{ - "value",}; + return new String[] {"value"}; } /** @@ -1026,8 +1025,7 @@ public void setComponentState(Object state) { */ @Override public Class[] getPropertyTypes() { - return new Class[]{ - Boolean.class,}; + return new Class[] { Boolean.class }; } /** diff --git a/CodenameOne/src/com/codename1/io/gzip/Deflate.java b/CodenameOne/src/com/codename1/io/gzip/Deflate.java index 0bcc7a59ab..48a7a2a17c 100644 --- a/CodenameOne/src/com/codename1/io/gzip/Deflate.java +++ b/CodenameOne/src/com/codename1/io/gzip/Deflate.java @@ -56,7 +56,7 @@ final class Deflate { "data error", // Z_DATA_ERROR (-3) "insufficient memory", // Z_MEM_ERROR (-4) "buffer error", // Z_BUF_ERROR (-5) - "incompatible version",// Z_VERSION_ERROR (-6) + "incompatible version", // Z_VERSION_ERROR (-6) "" }; // block not completed, need more input or more output @@ -386,7 +386,7 @@ void pqdownheap(short[] tree, // the tree to restore // Scan a literal or distance tree to determine the frequencies of the codes // in the bit length tree. - void scanTree(short[] tree,// the tree to be scanned + void scanTree(short[] tree, // the tree to be scanned int maxCode // and its largest code of non-zero frequency ) { int n; // iterates over all tree elements @@ -482,7 +482,7 @@ void sendAllTrees(int lcodes, int dcodes, int blcodes) { // Send a literal or distance tree in compressed form, using the codes in // bl_tree. - void sendTree(short[] tree,// the tree to be sent + void sendTree(short[] tree, // the tree to be sent int maxCode // and its largest code of non zero frequency ) { int n; // iterates over all tree elements @@ -1033,7 +1033,7 @@ int deflateFast(int flush) { if (lookahead >= MIN_MATCH) { insH = (((insH) << hashShift) ^ (window[(strStart) + (MIN_MATCH - 1)] & 0xff)) & hashMask; -// prev[strstart&w_mask]=hashHead=head[ins_h]; +// prev[strstart&w_mask]=hashHead=head[ins_h]; hashHead = (head[insH] & 0xffff); prev[strStart & wMask] = head[insH]; head[insH] = (short) strStart; @@ -1069,7 +1069,7 @@ int deflateFast(int flush) { strStart++; insH = ((insH << hashShift) ^ (window[(strStart) + (MIN_MATCH - 1)] & 0xff)) & hashMask; -// prev[strstart&w_mask]=hashHead=head[ins_h]; +// prev[strstart&w_mask]=hashHead=head[ins_h]; hashHead = (head[insH] & 0xffff); prev[strStart & wMask] = head[insH]; head[insH] = (short) strStart; @@ -1145,7 +1145,7 @@ int deflateSlow(int flush) { if (lookahead >= MIN_MATCH) { insH = (((insH) << hashShift) ^ (window[(strStart) + (MIN_MATCH - 1)] & 0xff)) & hashMask; -// prev[strstart&w_mask]=hashHead=head[ins_h]; +// prev[strstart&w_mask]=hashHead=head[ins_h]; hashHead = (head[insH] & 0xffff); prev[strStart & wMask] = head[insH]; head[insH] = (short) strStart; diff --git a/CodenameOne/src/com/codename1/io/gzip/InfBlocks.java b/CodenameOne/src/com/codename1/io/gzip/InfBlocks.java index c39b747a05..b7f4d7787d 100644 --- a/CodenameOne/src/com/codename1/io/gzip/InfBlocks.java +++ b/CodenameOne/src/com/codename1/io/gzip/InfBlocks.java @@ -49,7 +49,7 @@ final class InfBlocks { static final private int TYPE = 0; // get type bits (3, including end bit) static final private int LENS = 1; // get lengths for stored - static final private int STORED = 2;// processing stored block + static final private int STORED = 2; // processing stored block static final private int TABLE = 3; // get table lengths static final private int BTREE = 4; // get bit lengths tree for a dynamic block static final private int DTREE = 5; // get length, distance trees for a dynamic block diff --git a/CodenameOne/src/com/codename1/io/gzip/InfCodes.java b/CodenameOne/src/com/codename1/io/gzip/InfCodes.java index 553837120e..b3db365d8d 100644 --- a/CodenameOne/src/com/codename1/io/gzip/InfCodes.java +++ b/CodenameOne/src/com/codename1/io/gzip/InfCodes.java @@ -55,12 +55,12 @@ final class InfCodes { static final private int LEN = 1; // i: get length/literal/eob next static final private int LENEXT = 2; // i: getting length extra (have base) static final private int DIST = 3; // i: get distance next - static final private int DISTEXT = 4;// i: getting distance extra + static final private int DISTEXT = 4; // i: getting distance extra static final private int COPY = 5; // o: copying bytes in window, waiting for space static final private int LIT = 6; // o: got literal, waiting for output space static final private int WASH = 7; // o: got eob, possibly still output waiting static final private int END = 8; // x: got eob and all data flushed - static final private int BADCODE = 9;// x: got error + static final private int BADCODE = 9; // x: got error private final ZStream z; private final InfBlocks s; int mode; // current inflate_codes mode diff --git a/CodenameOne/src/com/codename1/io/gzip/InfTree.java b/CodenameOne/src/com/codename1/io/gzip/InfTree.java index 66dc9e74d3..4b13631ec8 100644 --- a/CodenameOne/src/com/codename1/io/gzip/InfTree.java +++ b/CodenameOne/src/com/codename1/io/gzip/InfTree.java @@ -214,8 +214,8 @@ final class InfTree { static int inflateTreesFixed(int[] bl, //literal desired/actual bit depth int[] bd, //distance desired/actual bit depth - int[][] tl,//literal/length tree result - int[][] td,//distance tree result + int[][] tl, //literal/length tree result + int[][] td, //distance tree result ZStream z //for memory allocation ) { bl[0] = fixed_bl; @@ -233,8 +233,8 @@ private int huftBuild(int[] b, // code lengths in bits (all assumed <= BMAX) int[] e, // list of extra bits for non-simple codes int[] t, // result: starting table int[] m, // maximum lookup bits, returns actual - int[] hp,// space for trees - int[] hn,// hufts used in space + int[] hp, // space for trees + int[] hn, // hufts used in space int[] v // working area: values in order of bit length ) { // Given a list of code lengths and a maximum table size, make a set of diff --git a/CodenameOne/src/com/codename1/io/gzip/Inflate.java b/CodenameOne/src/com/codename1/io/gzip/Inflate.java index bdd6cda50d..f2611fc6a0 100644 --- a/CodenameOne/src/com/codename1/io/gzip/Inflate.java +++ b/CodenameOne/src/com/codename1/io/gzip/Inflate.java @@ -247,9 +247,9 @@ int inflate(int f) { this.mode = BAD; z.msg = "unknown compression method"; // since zlib 1.2, it is allowted to inflateSync for this case. - /* + /* this.marker = 5; // can't try inflateSync - */ + */ break; } @@ -261,9 +261,9 @@ int inflate(int f) { this.mode = BAD; z.msg = "invalid window size"; // since zlib 1.2, it is allowted to inflateSync for this case. - /* + /* this.marker = 5; // can't try inflateSync - */ + */ break; } @@ -403,7 +403,7 @@ int inflate(int f) { this.mode = BAD; this.marker = 5; // can't try inflateSync break; - */ + */ } else if (flags != 0 && gheader != null) { gheader.crc = this.need; } diff --git a/CodenameOne/src/com/codename1/processing/PrettyPrinter.java b/CodenameOne/src/com/codename1/processing/PrettyPrinter.java index ccde53ce36..80a02d4246 100644 --- a/CodenameOne/src/com/codename1/processing/PrettyPrinter.java +++ b/CodenameOne/src/com/codename1/processing/PrettyPrinter.java @@ -32,7 +32,7 @@ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING Derivative Revision History: 2012-03 - Pulled this code from Sun's JavaME JSON impl, JSONObject - and moved to separate utility class. + and moved to separate utility class. */ package com.codename1.processing; diff --git a/CodenameOne/src/com/codename1/processing/Result.java b/CodenameOne/src/com/codename1/processing/Result.java index 39a39fd03c..22d622781d 100644 --- a/CodenameOne/src/com/codename1/processing/Result.java +++ b/CodenameOne/src/com/codename1/processing/Result.java @@ -190,11 +190,11 @@ public static Result fromContent(String content, String format) * *
      * ConnectionRequest request = new ConnectionRequest() {
-     * 	protected void readResponse(InputStream input) throws IOException {
-     * 		Result evaluator = Result.fromContent(input, Result.JSON);
-     * 		// ... evaluate the result here
+     *     protected void readResponse(InputStream input) throws IOException {
+     *         Result evaluator = Result.fromContent(input, Result.JSON);
+     *         // ... evaluate the result here
      *    }
-     * 	// ... etc
+     *     // ... etc
      * };
      * 
* @@ -231,11 +231,11 @@ public static Result fromContent(InputStream content, String format) * *
      * ConnectionRequest request = new ConnectionRequest() {
-     * 	protected void readResponse(InputStream input) throws IOException {
-     * 		Result evaluator = Result.fromContent(input, Result.JSON);
-     * 		// ... evaluate the result here
+     *     protected void readResponse(InputStream input) throws IOException {
+     *         Result evaluator = Result.fromContent(input, Result.JSON);
+     *         // ... evaluate the result here
      *    }
-     * 	// ... etc
+     *     // ... etc
      * };
      * 
* @@ -661,7 +661,7 @@ public int getSizeOfArray(final String path) * *
      * String types[] = result
-     * 		.getAsStringArray("/results[0]/address_components[2]/types");
+     *         .getAsStringArray("/results[0]/address_components[2]/types");
      * 
* * @param path Path expression to evaluate @@ -721,7 +721,7 @@ private String getTextInternal(Object o) { * *
      * String types[] = result
-     * 		.getAsStringArray("/results[0]/address_components[2]/types");
+     *         .getAsStringArray("/results[0]/address_components[2]/types");
      * 
* * @param path Path expression to evaluate @@ -751,7 +751,7 @@ public int[] getAsIntegerArray(final String path) * Get an array of values from the requested path. *
      * String types[] = result
-     * 		.getAsStringArray("/results[0]/address_components[2]/types");
+     *         .getAsStringArray("/results[0]/address_components[2]/types");
      * 
* * @param path Path expression to evaluate @@ -781,7 +781,7 @@ public long[] getAsLongArray(final String path) * Get an array of values from the requested path. *
      * String types[] = result
-     * 		.getAsStringArray("/results[0]/address_components[2]/types");
+     *         .getAsStringArray("/results[0]/address_components[2]/types");
      * 
* * @param path Path expression to evaluate @@ -807,7 +807,7 @@ public double[] getAsDoubleArray(final String path) * Get an array of values from the requested path. *
      * String types[] = result
-     * 		.getAsStringArray("/results[0]/address_components[2]/types");
+     *         .getAsStringArray("/results[0]/address_components[2]/types");
      * 
* * @param path Path expression to evaluate diff --git a/CodenameOne/src/com/codename1/processing/ResultTokenizer.java b/CodenameOne/src/com/codename1/processing/ResultTokenizer.java index 5273a073db..2aae65d063 100644 --- a/CodenameOne/src/com/codename1/processing/ResultTokenizer.java +++ b/CodenameOne/src/com/codename1/processing/ResultTokenizer.java @@ -32,8 +32,8 @@ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING Derivative Revision History: 2012-03 - derivative work from original Sun source, added - support for nested expressions to support new features added - to Result class. + support for nested expressions to support new features added + to Result class. */ package com.codename1.processing; diff --git a/CodenameOne/src/com/codename1/ui/Dialog.java b/CodenameOne/src/com/codename1/ui/Dialog.java index e669923fba..8672652247 100644 --- a/CodenameOne/src/com/codename1/ui/Dialog.java +++ b/CodenameOne/src/com/codename1/ui/Dialog.java @@ -1915,7 +1915,7 @@ private void growOrShrinkImpl(int w, int h) { menuHeight = menuBar.getPreferredH() + menuStyle.getVerticalMargins(); } prefWidth = Math.min(prefWidth, w); - h = h - menuHeight - title.getPreferredH();// - titleStyle.getMargin(false, TOP) - titleStyle.getMargin(false, BOTTOM); + h = h - menuHeight - title.getPreferredH(); // - titleStyle.getMargin(false, TOP) - titleStyle.getMargin(false, BOTTOM); int topBottom = Math.max(0, (h - prefHeight) / 2); int leftRight = Math.max(0, (w - prefWidth) / 2); int top = topBottom; diff --git a/CodenameOne/src/com/codename1/ui/Slider.java b/CodenameOne/src/com/codename1/ui/Slider.java index 3d8793d5a5..a088cb6a7a 100644 --- a/CodenameOne/src/com/codename1/ui/Slider.java +++ b/CodenameOne/src/com/codename1/ui/Slider.java @@ -440,7 +440,7 @@ public void paintComponentBackground(Graphics g) { g.drawImage(thumbImage, xPos, y + height / 2 - thumbImage.getHeight() / 2); } else { - int yPos = y;// + height - thumbImage.getHeight() / 2; + int yPos = y; // + height - thumbImage.getHeight() / 2; //yPos = Math.max(getY(), yPos); //yPos = Math.min(getY() + getHeight() - thumbImage.getHeight(), yPos); g.drawImage(thumbImage, getX() + width / 2 - thumbImage.getWidth() / 2, diff --git a/CodenameOne/src/com/codename1/ui/TextArea.java b/CodenameOne/src/com/codename1/ui/TextArea.java index 13f1826fcd..c174003d3d 100644 --- a/CodenameOne/src/com/codename1/ui/TextArea.java +++ b/CodenameOne/src/com/codename1/ui/TextArea.java @@ -1294,7 +1294,7 @@ private void initRowString() { rowStrings.add(rowText); //adding minCharactersInRow doesn't work if what is left is less //then minCharactersInRow - to = from;//+minCharactersInRow; + to = from; //+minCharactersInRow; } if (text[text.length - 1] == '\n') { rowStrings.add(""); diff --git a/CodenameOne/src/com/codename1/ui/animations/FlipTransition.java b/CodenameOne/src/com/codename1/ui/animations/FlipTransition.java index 2cb01bb902..7501baffa4 100644 --- a/CodenameOne/src/com/codename1/ui/animations/FlipTransition.java +++ b/CodenameOne/src/com/codename1/ui/animations/FlipTransition.java @@ -261,7 +261,7 @@ public void paint(Graphics g) { double sin = flipState * 2.0; double angle = MathUtil.asin(sin); - currTransform.rotate((float) angle, 0, 1, 0);// rotate about y axis + currTransform.rotate((float) angle, 0, 1, 0); // rotate about y axis } } else { img = destBuffer; @@ -273,7 +273,7 @@ public void paint(Graphics g) { // 1.0 -> 0 degrees double sin = (1.0 - flipState) * 2.0; double angle = Math.PI - MathUtil.asin(sin); - currTransform.rotate((float) angle, 0, 1, 0);// rotate about y axis + currTransform.rotate((float) angle, 0, 1, 0); // rotate about y axis } } if (transitionState == STATE_FLIP) { diff --git a/CodenameOne/src/com/codename1/ui/geom/GeneralPath.java b/CodenameOne/src/com/codename1/ui/geom/GeneralPath.java index 2e99e57d21..a2a8dfa1fd 100644 --- a/CodenameOne/src/com/codename1/ui/geom/GeneralPath.java +++ b/CodenameOne/src/com/codename1/ui/geom/GeneralPath.java @@ -482,7 +482,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("[General Path: "); Iterator it = createIteratorFromPool(this, null); - float[] buf = createFloatArrayFromPool(6);//new float[6]; + float[] buf = createFloatArrayFromPool(6); //new float[6]; try { while (!it.isDone()) { int type = it.currentSegment(buf); @@ -1036,7 +1036,7 @@ public void append(Shape shape, boolean connect) { * {@link PathIterator#SEG_MOVETO} unchanged. */ public void append(PathIterator path, boolean connect) { - float[] coords = createFloatArrayFromPool(6);//new float[6]; + float[] coords = createFloatArrayFromPool(6); //new float[6]; append(path, connect, coords); recycle(coords); } @@ -1631,7 +1631,7 @@ public boolean contains(int x, int y) { // // } // -// final double q1 = r1s;//ax * ax + ay * ay; +// final double q1 = r1s; //ax * ax + ay * ay; // final double q2 = q1 + ax * bx + ay * by; // final double k2 = 4d / 3d * (Math.sqrt(2d * q1 * q2) - q2) / (ax * by - ay * bx); // final float x2 = (float)(cx + ax - k2 * ay); @@ -1847,7 +1847,7 @@ private static Shape intersection(Rectangle r, Shape s, GeneralPath out) { Shape segmentedShape = segmentShape(r, s); Iterator it = createIteratorFromPool((GeneralPath) segmentedShape, null); //GeneralPath out = new GeneralPath(); - float[] buf = createFloatArrayFromPool(6);//new float[6]; + float[] buf = createFloatArrayFromPool(6); //new float[6]; try { boolean started = false; float x1 = r.getX(); diff --git a/CodenameOne/src/com/codename1/ui/html/CSSElement.java b/CodenameOne/src/com/codename1/ui/html/CSSElement.java index c4d6e0761a..be30909f17 100644 --- a/CodenameOne/src/com/codename1/ui/html/CSSElement.java +++ b/CodenameOne/src/com/codename1/ui/html/CSSElement.java @@ -190,8 +190,8 @@ class CSSElement extends HTMLElement { TYPE_NMTOKENS, // CSS_PAGE_URL (internal usage) TYPE_NMTOKENS, // CSS_BORDER_COLLAPSE TYPE_NMTOKENS, // CSS_EMPTY_CELLS - TYPE_NMTOKENS,// CSS_BORDER_SPACING - TYPE_NMTOKENS,// CSS_CAPTION_SIDE + TYPE_NMTOKENS, // CSS_BORDER_SPACING + TYPE_NMTOKENS, // CSS_CAPTION_SIDE TYPE_CSS_LENGTH_OR_PERCENTAGE, // CSS_WORD_SPACING TYPE_CSS_LENGTH_OR_PERCENTAGE_OR_MULTIPLIER, //CSS_LINE_HEIGHT TYPE_CSS_LENGTH_OR_PERCENTAGE, //CSS_MIN_WIDTH @@ -461,8 +461,8 @@ class CSSElement extends HTMLElement { null, //TYPE_NMTOKENS, // baseurl (internal usage) null, // CSS_BORDER_COLLAPSE null, // CSS_EMPTY_CELLS - null,// CSS_BORDER_SPACING - null,// CSS_CAPTION_SIDE + null, // CSS_BORDER_SPACING + null, // CSS_CAPTION_SIDE null, // CSS_WORD_SPACING {1}, //CSS_LINE_HEIGHT //normal means 100% of the font height (or 1 * font height) null, //CSS_MIN_WIDTH @@ -544,8 +544,8 @@ class CSSElement extends HTMLElement { null, //TYPE_NMTOKENS, // baseurl (internal usage) {"collapse", "separate"}, // CSS_BORDER_COLLAPSE {"hide", "show"}, // CSS_EMPTY_CELLS - null,// CSS_BORDER_SPACING - {"bottom", "top"},// CSS_CAPTION_SIDE + null, // CSS_BORDER_SPACING + {"bottom", "top"}, // CSS_CAPTION_SIDE null, // CSS_WORD_SPACING {"normal"}, //CSS_LINE_HEIGHT null, //CSS_MIN_WIDTH diff --git a/CodenameOne/src/com/codename1/ui/html/CellConstraint.java b/CodenameOne/src/com/codename1/ui/html/CellConstraint.java index 9bc7fc76f7..0cf20e80a9 100644 --- a/CodenameOne/src/com/codename1/ui/html/CellConstraint.java +++ b/CodenameOne/src/com/codename1/ui/html/CellConstraint.java @@ -35,8 +35,8 @@ * @author Ofir Leitner */ class CellConstraint { - int width = -1;//defaultColumnWidth; - int height = -1;//defaultRowHeight; + int width = -1; //defaultColumnWidth; + int height = -1; //defaultRowHeight; int spanHorizontal = 1; int spanVertical = 1; int align = -1; diff --git a/CodenameOne/src/com/codename1/ui/html/HTMLComponent.java b/CodenameOne/src/com/codename1/ui/html/HTMLComponent.java index 29d1d17de7..41e1e2d2a8 100644 --- a/CodenameOne/src/com/codename1/ui/html/HTMLComponent.java +++ b/CodenameOne/src/com/codename1/ui/html/HTMLComponent.java @@ -223,12 +223,12 @@ public class HTMLComponent extends Container implements ActionListener, IOCallba * A hashtable containing all defined HTMLFont objects */ static Hashtable fonts = new Hashtable(); - private static int INDENT_OL = -1;//Font.getDefaultFont().stringWidth("8888. "); //Ordered list - private static int INDENT_UL = -1;//Font.getDefaultFont().charWidth('W'); //Unordered list + private static int INDENT_OL = -1; //Font.getDefaultFont().stringWidth("8888. "); //Ordered list + private static int INDENT_UL = -1; //Font.getDefaultFont().charWidth('W'); //Unordered list /** * The default font to use */ - private static HTMLFont DEFAULT_FONT = null;//new HTMLFont(null,Font.createSystemFont(Font.FACE_SYSTEM, Font.STYLE_PLAIN, Font.SIZE_MEDIUM)); + private static HTMLFont DEFAULT_FONT = null; //new HTMLFont(null,Font.createSystemFont(Font.FACE_SYSTEM, Font.STYLE_PLAIN, Font.SIZE_MEDIUM)); /** * This static segment sets up the INPUT_TYPES vector with values from INPUT_TYPE_STRINGS. @@ -301,8 +301,8 @@ public class HTMLComponent extends Container implements ActionListener, IOCallba private Style pageStyle; // The page's user defined style private String pageUIID; // The page's user defined UIID // Links related - private Hashtable accessKeys = new Hashtable();// A hastable containing all the access keys in this document and their respective links - private Hashtable anchors;// A hashtable containing all the anchors of this document + private Hashtable accessKeys = new Hashtable(); // A hastable containing all the access keys in this document and their respective links + private Hashtable anchors; // A hashtable containing all the anchors of this document private Hashtable inputFields; // A hashtable containing all the input fields in the page. Used for FOR labels // this variable is only useful with the properties mostly for the purpose of the resource editor GUI builder private String htmlBody; @@ -347,12 +347,12 @@ public class HTMLComponent extends Container implements ActionListener, IOCallba // Lists private int ulLevel; //Unordered list level (Used to display the right bullet) private int olIndex; //Index of the current item in the list - private Vector olUpperLevelIndex;// = new Vector(); //Used to save the index when nesting + private Vector olUpperLevelIndex; // = new Vector(); //Used to save the index when nesting private int listType; // The type of the current list private int listIndent; // Holds the current list margin // Tables - private Vector tables;// A vector used for nesting, when a table contains a table ,the current one is "pushed" into the vector, to be "popped" later when the nested table processing ends. - private Vector tableCells;// A vector used for nesting of table cells + private Vector tables; // A vector used for nesting, when a table contains a table ,the current one is "pushed" into the vector, to be "popped" later when the nested table processing ends. + private Vector tableCells; // A vector used for nesting of table cells // Misc. tags private Vector fieldsets; // A vector used to support FIELDSET tag nesting private int preTagCount = 0; // A counter used to support PRE tag nesting @@ -2125,7 +2125,7 @@ private Label addString(String str, int align) { mainLink = (HTMLLink) lbl; } if (accesskey != '\0') { - addAccessKey(accesskey, lbl, false);//accessKeys.put(new Integer(accesskey), lbl); + addAccessKey(accesskey, lbl, false); //accessKeys.put(new Integer(accesskey), lbl); accesskey = '\0'; // To prevent the access key from adding again to all words of the link } lbl.getSelectedStyle().setMargin(0, 0, 0, 0); @@ -2138,7 +2138,7 @@ private Label addString(String str, int align) { if (labelForID != null) { lbl = new ForLabel(str, this, labelForID); if (accesskey != '\0') { - addAccessKey(accesskey, lbl, false);//accessKeys.put(new Integer(accesskey), lbl); + addAccessKey(accesskey, lbl, false); //accessKeys.put(new Integer(accesskey), lbl); accesskey = '\0'; // To prevent the access key from adding again to all words of the link } labelForID = null; @@ -2320,7 +2320,7 @@ private void handleImage(HTMLElement imgElement, int align, Command cmd) { mainLink = (HTMLLink) imgLabel; } if (accesskey != '\0') { - addAccessKey(accesskey, imgLabel, false);//accessKeys.put(new Integer(accesskey), imgLabel); + addAccessKey(accesskey, imgLabel, false); //accessKeys.put(new Integer(accesskey), imgLabel); } if (!PROCESS_HTML_MP1_ONLY) { ((HTMLLink) imgLabel).isMap = (imgElement.getAttributeById(HTMLElement.ATTR_ISMAP) != null); @@ -2656,7 +2656,7 @@ private void handleInput(HTMLElement element, int align) { } String aKey = element.getAttributeById(HTMLElement.ATTR_ACCESSKEY); if ((aKey != null) && (aKey.length() == 1)) { - addAccessKey(aKey.charAt(0), cmp, false);//accessKeys.put(new Integer(aKey.charAt(0)), cmp); + addAccessKey(aKey.charAt(0), cmp, false); //accessKeys.put(new Integer(aKey.charAt(0)), cmp); } if (eventsListener != null) { eventsListener.registerComponent(cmp, element); @@ -3176,7 +3176,7 @@ private void processTag(HTMLElement element, int align) { child.setAssociatedComponents(curTextArea); //Even if CSS is off, we need to associate it for HTMLElement.getCurentValue String aKey = element.getAttributeById(HTMLElement.ATTR_ACCESSKEY); if ((aKey != null) && (aKey.length() == 1)) { - addAccessKey(aKey.charAt(0), curTextArea, false);//accessKeys.put(new Integer(aKey.charAt(0)), curTextArea); + addAccessKey(aKey.charAt(0), curTextArea, false); //accessKeys.put(new Integer(aKey.charAt(0)), curTextArea); } break; diff --git a/CodenameOne/src/com/codename1/ui/html/HTMLElement.java b/CodenameOne/src/com/codename1/ui/html/HTMLElement.java index f4a808df29..9497be79a9 100644 --- a/CodenameOne/src/com/codename1/ui/html/HTMLElement.java +++ b/CodenameOne/src/com/codename1/ui/html/HTMLElement.java @@ -144,7 +144,7 @@ public class HTMLElement extends Element { public static final int TAG_S = 67; // Strike through public static final int TAG_STRIKE = 68; // Strike through public static final int TAG_CENTER = 69; // shorthand for DIV align=center - public static final int TAG_DIR = 70;// Same as UL + public static final int TAG_DIR = 70; // Same as UL public static final int TAG_MAP = 71; public static final int TAG_AREA = 72; public static final int TAG_LEGEND = 73; @@ -703,7 +703,7 @@ public class HTMLElement extends Element { {}, //S = 67; // Strike through {}, //STRIKE = 68; // Strike through {}, //CENTER = 69; // shorthand for DIV align=center - {}, //DIR = 70;// Same as UL + {}, //DIR = 70; // Same as UL { ATTR_NAME }, //MAP = 71; @@ -746,7 +746,7 @@ public class HTMLElement extends Element { ATTR_VALUE, // cdata ATTR_DISABLED, ATTR_READONLY - },//BUTTON = 81; + }, //BUTTON = 81; {}, //TEXT = 82; }; diff --git a/CodenameOne/src/com/codename1/ui/layouts/mig/AC.java b/CodenameOne/src/com/codename1/ui/layouts/mig/AC.java index b2c7af0b5e..c0ceff6de1 100644 --- a/CodenameOne/src/com/codename1/ui/layouts/mig/AC.java +++ b/CodenameOne/src/com/codename1/ui/layouts/mig/AC.java @@ -189,35 +189,35 @@ public AC fill(int... indexes) { return this; } -// /** Specifies that the current row/column should be put in the end group s and will thus share the same ending -// * coordinate within the group. -// *

-// * For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com. -// * @param s A name to associate on the group that should be the same for other rows/columns in the same group. -// * @return this so it is possible to chain calls. E.g. new AxisConstraint().noGrid().gap().fill(). -// */ -// public final AxisConstraint endGroup(String s) -// { -// return endGroup(s, curIx); -// } +// /** Specifies that the current row/column should be put in the end group s and will thus share the same ending +// * coordinate within the group. +// *

+// * For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com. +// * @param s A name to associate on the group that should be the same for other rows/columns in the same group. +// * @return this so it is possible to chain calls. E.g. new AxisConstraint().noGrid().gap().fill(). +// */ +// public final AxisConstraint endGroup(String s) +// { +// return endGroup(s, curIx); +// } // -// /** Specifies that the indicated rows/columns should be put in the end group s and will thus share the same ending -// * coordinate within the group. -// *

-// * For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com. -// * @param s A name to associate on the group that should be the same for other rows/columns in the same group. -// * @param indexes The index(es) (0-based) of the columns/rows that should be affected by this constraint. -// * @return this so it is possible to chain calls. E.g. new AxisConstraint().noGrid().gap().fill(). -// */ -// public final AxisConstraint endGroup(String s, int... indexes) -// { -// for (int i = indexes.length - 1; i >= 0; i--) { -// int ix = indexes[i]; -// makeSize(ix); -// cList.get(ix).setEndGroup(s); -// } -// return this; -// } +// /** Specifies that the indicated rows/columns should be put in the end group s and will thus share the same ending +// * coordinate within the group. +// *

+// * For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com. +// * @param s A name to associate on the group that should be the same for other rows/columns in the same group. +// * @param indexes The index(es) (0-based) of the columns/rows that should be affected by this constraint. +// * @return this so it is possible to chain calls. E.g. new AxisConstraint().noGrid().gap().fill(). +// */ +// public final AxisConstraint endGroup(String s, int... indexes) +// { +// for (int i = indexes.length - 1; i >= 0; i--) { +// int ix = indexes[i]; +// makeSize(ix); +// cList.get(ix).setEndGroup(s); +// } +// return this; +// } /** * Specifies that the current row/column should be put in the size group s and will thus share the same size diff --git a/CodenameOne/src/com/codename1/ui/layouts/mig/CodenameOneMiGComponentWrapper.java b/CodenameOne/src/com/codename1/ui/layouts/mig/CodenameOneMiGComponentWrapper.java index 19c14ede44..4d076c4d6c 100644 --- a/CodenameOne/src/com/codename1/ui/layouts/mig/CodenameOneMiGComponentWrapper.java +++ b/CodenameOne/src/com/codename1/ui/layouts/mig/CodenameOneMiGComponentWrapper.java @@ -139,15 +139,15 @@ public final Object getComponent() { public final float getPixelUnitFactor(boolean isHor) { switch (PlatformDefaults.getLogicalPixelBase()) { case PlatformDefaults.BASE_FONT_SIZE: - /*Font font = c.getFont(); - FontMetrics fm = c.getFontMetrics(font != null ? font : SUBST_FONT); - Point.Float p = FM_MAP.get(fm); - if (p == null) { - Rectangle2D r = fm.getStringBounds("X", c.getGraphics()); - p = new Point.Float(((float) r.getWidth()) / 6f, ((float) r.getHeight()) / 13.27734375f); - FM_MAP.put(fm, p); - } - return isHor ? p.x : p.y;*/ + /*Font font = c.getFont(); + FontMetrics fm = c.getFontMetrics(font != null ? font : SUBST_FONT); + Point.Float p = FM_MAP.get(fm); + if (p == null) { + Rectangle2D r = fm.getStringBounds("X", c.getGraphics()); + p = new Point.Float(((float) r.getWidth()) / 6f, ((float) r.getHeight()) / 13.27734375f); + FM_MAP.put(fm, p); + } + return isHor ? p.x : p.y;*/ return isHor ? ((float) SUBST_FONT.charWidth('X')) / 6f : ((float) SUBST_FONT.getHeight() / 13.27734375f); case PlatformDefaults.BASE_SCALE_FACTOR: @@ -295,24 +295,24 @@ public final int[] getVisualPadding() { @Override public final void paintDebugOutline(boolean showVisualPadding) { - /*if (c.isShowing() == false) - return; - - Graphics2D g = (Graphics2D) c.getGraphics(); - if (g == null) - return; - - g.setPaint(DB_COMP_OUTLINE); - g.setStroke(new BasicStroke(1f, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER, 10f, new float[] {2f, 4f}, 0)); - g.drawRect(0, 0, getWidth() - 1, getHeight() - 1); - - if (showVisualPadding && isVisualPaddingEnabled()) { - int[] padding = getVisualPadding(); - if (padding != null) { - g.setColor(Color.GREEN); - g.drawRect(padding[1], padding[0], (getWidth() - 1) - (padding[1] + padding[3]), (getHeight() - 1) - (padding[0] + padding[2])); - } - }*/ + /*if (c.isShowing() == false) + return; + + Graphics2D g = (Graphics2D) c.getGraphics(); + if (g == null) + return; + + g.setPaint(DB_COMP_OUTLINE); + g.setStroke(new BasicStroke(1f, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER, 10f, new float[] {2f, 4f}, 0)); + g.drawRect(0, 0, getWidth() - 1, getHeight() - 1); + + if (showVisualPadding && isVisualPaddingEnabled()) { + int[] padding = getVisualPadding(); + if (padding != null) { + g.setColor(Color.GREEN); + g.drawRect(padding[1], padding[0], (getWidth() - 1) - (padding[1] + padding[3]), (getHeight() - 1) - (padding[0] + padding[2])); + } + }*/ } @Override diff --git a/CodenameOne/src/com/codename1/ui/layouts/mig/CodenameOneMiGContainerWrapper.java b/CodenameOne/src/com/codename1/ui/layouts/mig/CodenameOneMiGContainerWrapper.java index 316bbfc24c..5cbd66d160 100644 --- a/CodenameOne/src/com/codename1/ui/layouts/mig/CodenameOneMiGContainerWrapper.java +++ b/CodenameOne/src/com/codename1/ui/layouts/mig/CodenameOneMiGContainerWrapper.java @@ -75,13 +75,13 @@ public boolean isLeftToRight() { @Override public void paintDebugCell(int x, int y, int width, int height) { // TODO: this can probably be done using glasspane - /*Graphics2D g = (Graphics2D) c.getGraphics(); - if (g == null) - return; + /*Graphics2D g = (Graphics2D) c.getGraphics(); + if (g == null) + return; - g.setStroke(new BasicStroke(1f, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER, 10f, new float[] {2f, 3f}, 0)); - g.setPaint(DB_CELL_OUTLINE); - g.drawRect(x, y, width - 1, height - 1);*/ + g.setStroke(new BasicStroke(1f, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER, 10f, new float[] {2f, 3f}, 0)); + g.setPaint(DB_CELL_OUTLINE); + g.drawRect(x, y, width - 1, height - 1);*/ } @Override diff --git a/CodenameOne/src/com/codename1/ui/layouts/mig/ComponentWrapper.java b/CodenameOne/src/com/codename1/ui/layouts/mig/ComponentWrapper.java index f7b7a1562f..8077502e47 100644 --- a/CodenameOne/src/com/codename1/ui/layouts/mig/ComponentWrapper.java +++ b/CodenameOne/src/com/codename1/ui/layouts/mig/ComponentWrapper.java @@ -38,7 +38,7 @@ *

* NOTE!.equals() and .hashcode() should be forwarded to the wrapped component. E.g. *

- * 	public int hashCode()
+ *     public int hashCode()
  * {
  * return getComponent().hashCode();
  * }
diff --git a/CodenameOne/src/com/codename1/ui/layouts/mig/ConstraintParser.java b/CodenameOne/src/com/codename1/ui/layouts/mig/ConstraintParser.java
index 0820d92b03..fe68a3e0cb 100644
--- a/CodenameOne/src/com/codename1/ui/layouts/mig/ConstraintParser.java
+++ b/CodenameOne/src/com/codename1/ui/layouts/mig/ConstraintParser.java
@@ -285,7 +285,7 @@ public static LC parseLayoutConstraint(String s) {
             }
         }
 
-//		lc = (LC) serializeTest(lc);
+//        lc = (LC) serializeTest(lc);
         return lc;
     }
 
@@ -352,7 +352,7 @@ private static AC parseAxisConstraint(String s, boolean isCols) {
         AC ac = new AC();
         ac.setConstaints(colSpecs);
 
-//		ac = (AC) serializeTest(ac);
+//        ac = (AC) serializeTest(ac);
         return ac;
     }
 
@@ -387,7 +387,7 @@ private static DimConstraint parseDimConstraint(String s, BoundSize gapBefore, B
 
                 if ("fill".equals(part)) {
                     dimConstraint.setFill(true);
-//					 dimConstraint.setAlign(null);   // Can not have both fill and alignment (changed for 3.5 since it can have "growy 0")
+//                     dimConstraint.setAlign(null);   // Can not have both fill and alignment (changed for 3.5 since it can have "growy 0")
                     continue;
                 }
 
@@ -436,7 +436,7 @@ private static DimConstraint parseDimConstraint(String s, BoundSize gapBefore, B
                 if (c == 'a') {
                     ix = startsWithLenient(part, "align", 2, true);
                     if (ix > -1) {
-//						if (dimConstraint.isFill() == false)    // Swallow, but ignore if fill is set. (changed for 3.5 since it can have "growy 0")
+//                        if (dimConstraint.isFill() == false)    // Swallow, but ignore if fill is set. (changed for 3.5 since it can have "growy 0")
                         dimConstraint.setAlign(parseUnitValueOrAlign(part.substring(ix).trim(), isCols, null));
                         continue;
                     }
@@ -444,7 +444,7 @@ private static DimConstraint parseDimConstraint(String s, BoundSize gapBefore, B
 
                 UnitValue align = parseAlignKeywords(part, isCols);
                 if (align != null) {
-//					if (dimConstraint.isFill() == false)    // Swallow, but ignore if fill is set. (changed for 3.5 since it can have "growy 0")
+//                    if (dimConstraint.isFill() == false)    // Swallow, but ignore if fill is set. (changed for 3.5 since it can have "growy 0")
                     dimConstraint.setAlign(align);
                     continue;
                 }
@@ -1594,38 +1594,38 @@ public static String prepare(String s) {
         return s != null ? s.trim().toLowerCase() : "";
     }
 
-//	/** Tests to serialize and deserialize the object with both XMLEncoder/Decoder and through Serializable
-//	 * @param o The object to serialize
-//	 * @return The same object after a tri through the process.
-//	 */
-//	public static final Object serializeTest(Object o)
-//	{
-//		try {
-//			ByteArrayOutputStream barr = new ByteArrayOutputStream();
-//			XMLEncoder enc = new XMLEncoder(barr);
-//			enc.writeObject(o);
-//			enc.close();
+//    /** Tests to serialize and deserialize the object with both XMLEncoder/Decoder and through Serializable
+//     * @param o The object to serialize
+//     * @return The same object after a tri through the process.
+//     */
+//    public static final Object serializeTest(Object o)
+//    {
+//        try {
+//            ByteArrayOutputStream barr = new ByteArrayOutputStream();
+//            XMLEncoder enc = new XMLEncoder(barr);
+//            enc.writeObject(o);
+//            enc.close();
 //
-//			XMLDecoder dec = new XMLDecoder(new ByteArrayInputStream(barr.toByteArray()));
-//			o = dec.readObject();
-//			dec.close();
-//		} catch (Exception e) {
-//			e.printStackTrace();
-//		}
+//            XMLDecoder dec = new XMLDecoder(new ByteArrayInputStream(barr.toByteArray()));
+//            o = dec.readObject();
+//            dec.close();
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
 //
-//		try {
-//			ByteArrayOutputStream barr = new ByteArrayOutputStream();
-//			ObjectOutputStream oos = new ObjectOutputStream(barr);
-//			oos.writeObject(o);
-//			oos.close();
+//        try {
+//            ByteArrayOutputStream barr = new ByteArrayOutputStream();
+//            ObjectOutputStream oos = new ObjectOutputStream(barr);
+//            oos.writeObject(o);
+//            oos.close();
 //
-//			ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(barr.toByteArray()));
-//			o = ois.readObject();
-//			ois.close();
-//		} catch (Exception e) {
-//			e.printStackTrace();
-//		}
+//            ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(barr.toByteArray()));
+//            o = ois.readObject();
+//            ois.close();
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
 //
-//		return o;
-//	}
+//        return o;
+//    }
 }
diff --git a/CodenameOne/src/com/codename1/ui/layouts/mig/Grid.java b/CodenameOne/src/com/codename1/ui/layouts/mig/Grid.java
index bfe19fa930..6b2175ac8a 100644
--- a/CodenameOne/src/com/codename1/ui/layouts/mig/Grid.java
+++ b/CodenameOne/src/com/codename1/ui/layouts/mig/Grid.java
@@ -167,7 +167,7 @@ public final class Grid {
      *                     Will not be altered.
      */
     public Grid(ContainerWrapper container, LC lc, AC rowConstr, AC colConstr, Map ccMap, ArrayList callbackList) {
-//		System.out.println("new grid!");
+//        System.out.println("new grid!");
         this.lc = lc;
         this.rowConstr = rowConstr;
         this.colConstr = colConstr;
@@ -332,8 +332,8 @@ public Grid(ContainerWrapper container, LC lc, AC rowConstr, AC colConstr, Map 0 && refWidth != lastRefWidth) || (refHeight > 0 && refHeight != lastRefHeight)) {
-//			System.out.println("prelayout for w: " + refWidth + ", h: " + refHeight);
+//            System.out.println("prelayout for w: " + refWidth + ", h: " + refHeight);
             int[] refBounds = new int[]{0, 0, (refWidth > 0 ? refWidth : width[LayoutUtil.PREF]), (refHeight > 0 ? refHeight : height[LayoutUtil.PREF])};
             layoutImpl(refBounds, null, null, false, true);
             calcGridSizes(refWidth, refHeight);
@@ -1333,7 +1333,7 @@ private void checkSizeCalcs(int refWidth, int refHeight) {
     }
 
     private void calcGridSizes(int refWidth, int refHeight) {
-//		System.out.println("REcalc grid size for w: " + refWidth + ", h: " + refHeight);
+//        System.out.println("REcalc grid size for w: " + refWidth + ", h: " + refHeight);
 
         colFlowSpecs = calcRowsOrColsSizes(true, refWidth);
         rowFlowSpecs = calcRowsOrColsSizes(false, refHeight);
diff --git a/CodenameOne/src/com/codename1/ui/layouts/mig/InCellGapProvider.java b/CodenameOne/src/com/codename1/ui/layouts/mig/InCellGapProvider.java
index c0eb7d90fe..0e37f4600b 100644
--- a/CodenameOne/src/com/codename1/ui/layouts/mig/InCellGapProvider.java
+++ b/CodenameOne/src/com/codename1/ui/layouts/mig/InCellGapProvider.java
@@ -42,7 +42,7 @@
  * 
  * {@code
  * if (adjacentComp == null || adjacentSide == SwingConstants.LEFT || adjacentSide == SwingConstants.TOP)
- * 	  return null;
+ *       return null;
  *
  * boolean isHor = (adjacentSide == SwingConstants.LEFT || adjacentSide == SwingConstants.RIGHT);
  *
diff --git a/CodenameOne/src/com/codename1/ui/layouts/mig/LayoutUtil.java b/CodenameOne/src/com/codename1/ui/layouts/mig/LayoutUtil.java
index 48a8351525..62aef510b8 100644
--- a/CodenameOne/src/com/codename1/ui/layouts/mig/LayoutUtil.java
+++ b/CodenameOne/src/com/codename1/ui/layouts/mig/LayoutUtil.java
@@ -418,29 +418,29 @@ static int[] roundSizes(float[] sizes) {
         return retInts;
     }
 
-//	static int getBaselineCorrect(Component comp)
-//	{
-//		Dimension pSize = comp.getPreferredSize();
-//		int baseline = comp.getBaseline(pSize.width, pSize.height);
-//		int nextBaseline = comp.getBaseline(pSize.width, pSize.height + 1);
+//    static int getBaselineCorrect(Component comp)
+//    {
+//        Dimension pSize = comp.getPreferredSize();
+//        int baseline = comp.getBaseline(pSize.width, pSize.height);
+//        int nextBaseline = comp.getBaseline(pSize.width, pSize.height + 1);
 //
-//		// Amount to add to height when calculating where baseline
-//		// lands for a particular height:
-//		int padding = 0;
+//        // Amount to add to height when calculating where baseline
+//        // lands for a particular height:
+//        int padding = 0;
 //
-//		// Where the baseline is relative to the mid point
-//		int baselineOffset = baseline - pSize.height / 2;
-//		if (pSize.height % 2 == 0 && baseline != nextBaseline) {
-//			padding = 1;
-//		} else if (pSize.height % 2 == 1 && baseline == nextBaseline) {
-//			baselineOffset--;
-//			padding = 1;
-//		}
+//        // Where the baseline is relative to the mid point
+//        int baselineOffset = baseline - pSize.height / 2;
+//        if (pSize.height % 2 == 0 && baseline != nextBaseline) {
+//            padding = 1;
+//        } else if (pSize.height % 2 == 1 && baseline == nextBaseline) {
+//            baselineOffset--;
+//            padding = 1;
+//        }
 //
-//		// The following calculates where the baseline lands for
-//		// the height z:
-//		return (pSize.height + padding) / 2 + baselineOffset;
-//	}
+//        // The following calculates where the baseline lands for
+//        // the height z:
+//        return (pSize.height + padding) / 2 + baselineOffset;
+//    }
 
     /**
      * Safe equals. null == null, but null never equals anything else.
diff --git a/CodenameOne/src/com/codename1/ui/layouts/mig/PlatformDefaults.java b/CodenameOne/src/com/codename1/ui/layouts/mig/PlatformDefaults.java
index ac42328e2e..84c725e42a 100644
--- a/CodenameOne/src/com/codename1/ui/layouts/mig/PlatformDefaults.java
+++ b/CodenameOne/src/com/codename1/ui/layouts/mig/PlatformDefaults.java
@@ -86,26 +86,26 @@ public final class PlatformDefaults {
      * 

*/ public static final String VISUAL_PADDING_PROPERTY = "visualPadding"; - // private static final UnitValue LPX1 = new UnitValue(1, UnitValue.LPX, null); -// private static final UnitValue LPX4 = new UnitValue(4, UnitValue.LPX, null); + // private static final UnitValue LPX1 = new UnitValue(1, UnitValue.LPX, null); +// private static final UnitValue LPX4 = new UnitValue(4, UnitValue.LPX, null); private static final UnitValue LPX6 = new UnitValue(6, UnitValue.LPX, null); private static final UnitValue LPX7 = new UnitValue(7, UnitValue.LPX, null); - // private static final UnitValue LPX8 = new UnitValue(8, UnitValue.LPX, null); -// private static final UnitValue LPX9 = new UnitValue(9, UnitValue.LPX, null); -// private static final UnitValue LPX10 = new UnitValue(10, UnitValue.LPX, null); + // private static final UnitValue LPX8 = new UnitValue(8, UnitValue.LPX, null); +// private static final UnitValue LPX9 = new UnitValue(9, UnitValue.LPX, null); +// private static final UnitValue LPX10 = new UnitValue(10, UnitValue.LPX, null); private static final UnitValue LPX11 = new UnitValue(11, UnitValue.LPX, null); private static final UnitValue LPX12 = new UnitValue(12, UnitValue.LPX, null); - // private static final UnitValue LPX14 = new UnitValue(14, UnitValue.LPX, null); + // private static final UnitValue LPX14 = new UnitValue(14, UnitValue.LPX, null); private static final UnitValue LPX16 = new UnitValue(16, UnitValue.LPX, null); private static final UnitValue LPX18 = new UnitValue(18, UnitValue.LPX, null); private static final UnitValue LPX20 = new UnitValue(20, UnitValue.LPX, null); - // private static final UnitValue LPY1 = new UnitValue(1, UnitValue.LPY, null); -// private static final UnitValue LPY4 = new UnitValue(4, UnitValue.LPY, null); + // private static final UnitValue LPY1 = new UnitValue(1, UnitValue.LPY, null); +// private static final UnitValue LPY4 = new UnitValue(4, UnitValue.LPY, null); private static final UnitValue LPY6 = new UnitValue(6, UnitValue.LPY, null); private static final UnitValue LPY7 = new UnitValue(7, UnitValue.LPY, null); - // private static final UnitValue LPY8 = new UnitValue(8, UnitValue.LPY, null); -// private static final UnitValue LPY9 = new UnitValue(9, UnitValue.LPY, null); -// private static final UnitValue LPY10 = new UnitValue(10, UnitValue.LPY, null); + // private static final UnitValue LPY8 = new UnitValue(8, UnitValue.LPY, null); +// private static final UnitValue LPY9 = new UnitValue(9, UnitValue.LPY, null); +// private static final UnitValue LPY10 = new UnitValue(10, UnitValue.LPY, null); private static final UnitValue LPY11 = new UnitValue(11, UnitValue.LPY, null); private static final UnitValue LPY12 = new UnitValue(12, UnitValue.LPY, null); private static final UnitValue LPY14 = new UnitValue(14, UnitValue.LPY, null); @@ -115,7 +115,7 @@ public final class PlatformDefaults { // Used for holding values. private final static UnitValue[] PANEL_INS = new UnitValue[4]; private final static UnitValue[] DIALOG_INS = new UnitValue[4]; - // private static final int KDE = 3; + // private static final int KDE = 3; private static final HashMap HOR_DEFS = new HashMap(32); private static final HashMap VER_DEFS = new HashMap(32); private static final HashMap VISUAL_BOUNDS = new HashMap(64); @@ -758,10 +758,10 @@ static BoundSize getDefaultComponentGap(ComponentWrapper comp, ComponentWrapper return null; } -// if (adjacentComp == null || adjacentSide == SwingConstants.LEFT || adjacentSide == SwingConstants.TOP) -// return null; +// if (adjacentComp == null || adjacentSide == SwingConstants.LEFT || adjacentSide == SwingConstants.TOP) +// return null; -// SwingConstants.RIGHT == 4, SwingConstants.LEFT == 2 +// SwingConstants.RIGHT == 4, SwingConstants.LEFT == 2 return (adjacentSide == 2 || adjacentSide == 4) ? RELATED_X : RELATED_Y; } diff --git a/CodenameOne/src/com/codename1/ui/list/MultiList.java b/CodenameOne/src/com/codename1/ui/list/MultiList.java index 23583b9280..9898b2eb2a 100644 --- a/CodenameOne/src/com/codename1/ui/list/MultiList.java +++ b/CodenameOne/src/com/codename1/ui/list/MultiList.java @@ -131,20 +131,20 @@ public String[] getPropertyNames() { @Override public Class[] getPropertyTypes() { return new Class[]{ - String.class,// name1 - String.class,// name2 - String.class,// name3 - String.class,// name4 - String.class,// uiid1 - String.class,// uiid2 - String.class,// uiid3 - String.class,// uiid4 - String.class,// iconName - String.class,// iconUiid - String.class,// iconPosition - String.class,// emblemName - String.class,// emblemUiid - String.class,// emblemPosition + String.class, // name1 + String.class, // name2 + String.class, // name3 + String.class, // name4 + String.class, // uiid1 + String.class, // uiid2 + String.class, // uiid3 + String.class, // uiid4 + String.class, // iconName + String.class, // iconUiid + String.class, // iconPosition + String.class, // emblemName + String.class, // emblemUiid + String.class, // emblemPosition Boolean.class, Boolean.class, Boolean.class, diff --git a/CodenameOne/src/com/codename1/ui/plaf/DefaultLookAndFeel.java b/CodenameOne/src/com/codename1/ui/plaf/DefaultLookAndFeel.java index 788c09d1e8..113603d50a 100644 --- a/CodenameOne/src/com/codename1/ui/plaf/DefaultLookAndFeel.java +++ b/CodenameOne/src/com/codename1/ui/plaf/DefaultLookAndFeel.java @@ -1886,7 +1886,7 @@ public Spans calculateTextFieldSpan(TextSelection sel, TextArea ta) { Style style = ta.getStyle(); int x = 0; - int cursorCharPosition = ta.hasFocus() ? ta.getCursorPosition() : 0;//ta.getCursorX(); + int cursorCharPosition = ta.hasFocus() ? ta.getCursorPosition() : 0; //ta.getCursorX(); Font f = style.getFont(); int cursorX = 0; int xPos = 0; @@ -2000,7 +2000,7 @@ public void drawTextField(Graphics g, TextArea ta) { Style style = ta.getStyle(); int x = 0; - int cursorCharPosition = ta.hasFocus() ? ta.getCursorPosition() : 0;//ta.getCursorX(); + int cursorCharPosition = ta.hasFocus() ? ta.getCursorPosition() : 0; //ta.getCursorX(); Font f = style.getFont(); int cursorX = 0; int xPos = 0; diff --git a/CodenameOne/src/com/codename1/ui/scene/PerspectiveCamera.java b/CodenameOne/src/com/codename1/ui/scene/PerspectiveCamera.java index 3f5a488a1f..50999235d8 100644 --- a/CodenameOne/src/com/codename1/ui/scene/PerspectiveCamera.java +++ b/CodenameOne/src/com/codename1/ui/scene/PerspectiveCamera.java @@ -79,7 +79,7 @@ public Transform getTransform() { currTransform.concatenate(perspectiveT); float zState = 0f; float cameraZ = -zNear - w * 0.5f * zState; - float cameraX = (float) -dw / 2;//-x-w/2; + float cameraX = (float) -dw / 2; //-x-w/2; float cameraY = -y - h * 0.5f; currTransform.translate(cameraX, cameraY, cameraZ); diff --git a/CodenameOne/src/com/codename1/ui/spinner/Spinner3D.java b/CodenameOne/src/com/codename1/ui/spinner/Spinner3D.java index bc37f881b9..6b013b0c03 100644 --- a/CodenameOne/src/com/codename1/ui/spinner/Spinner3D.java +++ b/CodenameOne/src/com/codename1/ui/spinner/Spinner3D.java @@ -141,7 +141,7 @@ public void scrollChanged(int scrollX, int scrollY, int oldscrollX, int oldscrol } private static boolean usePerspective() { - return false;//Transform.isPerspectiveSupported(); + return false; //Transform.isPerspectiveSupported(); } /**