Skip to content

Commit 2fb24b2

Browse files
committed
Fixed verification issues due to merge
1 parent 52c70cf commit 2fb24b2

File tree

4 files changed

+21
-7
lines changed

4 files changed

+21
-7
lines changed

CodenameOne/src/com/codename1/impl/CodenameOneImplementation.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7976,12 +7976,6 @@ public void paintComponentBackground(Object nativeGraphics, int x, int y, int wi
79767976
int iH = bgImageOrig.getHeight();
79777977
Object bgImage = bgImageOrig.getImage();
79787978
switch (s.getBackgroundType()) {
7979-
case Style.BACKGROUND_NONE:
7980-
if (s.getBgTransparency() != 0) {
7981-
setColor(nativeGraphics, s.getBgColor());
7982-
fillRect(nativeGraphics, x, y, width, height, s.getBgTransparency());
7983-
}
7984-
return;
79857979
case Style.BACKGROUND_IMAGE_SCALED:
79867980
if (isScaledImageDrawingSupported()) {
79877981
drawImage(nativeGraphics, bgImage, x, y, width, height);
@@ -8116,6 +8110,8 @@ public void paintComponentBackground(Object nativeGraphics, int x, int y, int wi
81168110
case Style.BACKGROUND_GRADIENT_LINEAR_VERTICAL:
81178111
case Style.BACKGROUND_GRADIENT_RADIAL:
81188112
drawGradientBackground(s, nativeGraphics, x, y, width, height);
8113+
default:
8114+
return;
81198115
}
81208116
}
81218117
}
@@ -8136,6 +8132,11 @@ private void drawGradientBackground(Style s, Object nativeGraphics, int x, int y
81368132
s.getBackgroundGradientRelativeSize());
81378133
return;
81388134
default:
8135+
// Style.BACKGROUND_NONE
8136+
if (s.getBgTransparency() != 0) {
8137+
setColor(nativeGraphics, s.getBgColor());
8138+
fillRect(nativeGraphics, x, y, width, height, s.getBgTransparency());
8139+
}
81398140
break;
81408141
}
81418142
setColor(nativeGraphics, s.getBgColor());

CodenameOne/src/com/codename1/ui/geom/GeneralPath.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2574,6 +2574,8 @@ public static int crossPath(PathIterator p, double x, double y) {
25742574
cross += crossLine(cx, cy, cx = mx, cy = my, x, y);
25752575
}
25762576
break;
2577+
default:
2578+
throw new IllegalStateException("Illegal General path segment: " + p.currentSegment(coords));
25772579
}
25782580

25792581
// checks if the point (x,y) is the vertex of shape with PathIterator p
@@ -2947,6 +2949,8 @@ public static int intersectPath(PathIterator p, double x, double y, double w, do
29472949
cx = mx;
29482950
cy = my;
29492951
break;
2952+
default:
2953+
throw new IllegalStateException("Illegal General path segment: " + p.currentSegment(coords));
29502954
}
29512955
if (count == CROSSING) {
29522956
return CROSSING;

CodenameOne/src/com/codename1/ui/plaf/DefaultLookAndFeel.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -846,6 +846,9 @@ public Spans calculateTextAreaSpan(TextSelection sel, TextArea ta) {
846846
break;
847847
case Component.BOTTOM:
848848
topPadding += Math.max(0, (ta.getInnerHeight() - (ta.getRowsGap() + fontHeight) * line));
849+
break;
850+
default:
851+
break;
849852
}
850853
//boolean shouldBreak = false;
851854
int posOffset = 0;
@@ -938,6 +941,9 @@ public void drawTextArea(Graphics g, TextArea ta) {
938941
break;
939942
case Component.BOTTOM:
940943
topPadding += Math.max(0, (ta.getInnerHeight() - ta.getRowsGap() * (line - 1) - fontHeight * line));
944+
break;
945+
default:
946+
break;
941947
}
942948
boolean shouldBreak = false;
943949

@@ -1069,6 +1075,8 @@ private Dimension getPreferredSize(Label l, Image[] icons, Image stateImage) {
10691075
prefW = Math.max(prefW, font.stringWidth(text));
10701076
prefH += font.getHeight();
10711077
break;
1078+
default:
1079+
break;
10721080
}
10731081
}
10741082
//add the state image(relevant for CheckBox\RadioButton)

CodenameOne/src/com/codename1/ui/table/TableLayout.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,8 @@ private void placeComponent(boolean rtl, Constraint con, int x, int y, int width
573573
con.parent.setY(y + d);
574574
con.parent.setHeight(height - d);
575575
break;
576-
case Component.CENTER:
576+
default:
577+
// Component.CENTER:
577578
con.parent.setY(y + d / 2);
578579
con.parent.setHeight(height - d);
579580
break;

0 commit comments

Comments
 (0)