Skip to content

Commit

Permalink
Add return type to setters
Browse files Browse the repository at this point in the history
  • Loading branch information
suyashmahar committed May 3, 2017
1 parent ad711bf commit 39eda72
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .settings/org.eclipse.buildship.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
connection.project.dir=
eclipse.preferences.version=1
6 changes: 6 additions & 0 deletions app/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry kind="output" path="bin"/>
</classpath>
3 changes: 3 additions & 0 deletions app/.settings/org.eclipse.buildship.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
connection.project.dir=..
eclipse.preferences.version=1
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
app:palette="Oranges"
app:fillStrokes="true"
app:fillTriangle="true"

android:clipChildren="true"
/>
</RelativeLayout>
Binary file added resources/default_pattern.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions trianglify/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry kind="output" path="bin"/>
</classpath>
3 changes: 3 additions & 0 deletions trianglify/.settings/org.eclipse.buildship.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
connection.project.dir=..
eclipse.preferences.version=1
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class TrianglifyView extends View implements TrianglifyViewInterface{
Palette.PuBu, Palette.BuPu, Palette.RdPu, Palette.PuRd, Palette.OrRd, Palette.YlOrRd,
Palette.YlOrBr, Palette.Purples, Palette.Blues, Palette.Greens, Palette.Oranges,
Palette.Reds, Palette.Greys, Palette.PuOr, Palette.BrBG, Palette.PRGn, Palette.PiYG,
Palette.RdBu, Palette.RdGy, Palette.RdYlBu, Palette.Spectral, Palette.RdYlGn};
Palette.RdBu, Palette.RdGy, Palette.RdYlBu, Palette.Spectral, Palette.RdYlGn};
Palette palette;

Triangulation triangulation;
Expand Down Expand Up @@ -76,80 +76,89 @@ public Palette getPalette() {
return palette;
}

public void setPalette(Palette palette) {
public TrianglifyView setPalette(Palette palette) {
this.palette = palette;
return this;
}

@Override
public int getCellSize() {
return cellSize;
}

public void setCellSize(int cellSize) {
public TrianglifyView setCellSize(int cellSize) {
this.cellSize = cellSize;
return this;
}

@Override
public int getGridHeight() {
return gridHeight;
}

public void setGridHeight(int gridHeight) {
public TrianglifyView setGridHeight(int gridHeight) {
this.gridHeight = gridHeight;
return this;
}

@Override
public int getGridWidth() {
return gridWidth;
}

public void setGridWidth(int gridWidth) {
public TrianglifyView setGridWidth(int gridWidth) {
this.gridWidth = gridWidth;
return this;
}

@Override
public int getBleedX() {
return bleedX;
}

public void setBleedX(int bleedX) {
public TrianglifyView setBleedX(int bleedX) {
this.bleedX = bleedX;
return this;
}

@Override
public int getBleedY() {
return bleedY;
}

public void setBleedY(int bleedY) {
public TrianglifyView setBleedY(int bleedY) {
this.bleedY = bleedY;
return this;
}

@Override
public int getTypeGrid() {
return typeGrid;
}

public void setTypeGrid(int typeGrid) {
public TrianglifyView setTypeGrid(int typeGrid) {
typeGrid = typeGrid;
return this;
}

@Override
public int getVariance() {
return variance;
}

public void setVariance(int variance) {
public TrianglifyView setVariance(int variance) {
this.variance = variance;
return this;
}

@Override
public int getPaletteNumber() {
return paletteNumber;
}

public void setPaletteNumber(int paletteNumber) {
public TrianglifyView setPaletteNumber(int paletteNumber) {
this.paletteNumber = paletteNumber;
return this;
}

@Override
Expand All @@ -166,26 +175,29 @@ public boolean isFillTriangle() {
return fillTriangle;
}

public void setFillTriangle(boolean fillTriangle) {
public TrianglifyView setFillTriangle(boolean fillTriangle) {
this.fillTriangle = fillTriangle;
return this;
}

@Override
public boolean isDrawStrokeEnabled() {
return drawStroke;
}

public void setDrawStrokeEnabled(boolean drawStroke) {
public TrianglifyView setDrawStrokeEnabled(boolean drawStroke) {
this.drawStroke = drawStroke;
return this;
}

@Override
public boolean isRandomColoringEnabled() {
return randomColoring;
}

public void setRandomColoring(boolean randomColoring) {
public TrianglifyView setRandomColoring(boolean randomColoring) {
this.randomColoring = randomColoring;
return this;
}

@Override
Expand Down

0 comments on commit 39eda72

Please sign in to comment.