id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
3,700
GwtMaterialDesign/gwt-material-table
src/main/java/gwt/material/design/client/ui/table/CellBasedWidgetImpl.java
CellBasedWidgetImpl.sinkEvents
public final void sinkEvents(Widget widget, Set<String> typeNames) { if (typeNames == null) { return; } int eventsToSink = 0; for (String typeName : typeNames) { int typeInt = Event.getTypeInt(typeName); if (typeInt < 0) { widget.sinkBitlessEvent(typeName); } else { typeInt = sinkEvent(widget, typeName); if (typeInt > 0) { eventsToSink |= typeInt; } } } if (eventsToSink > 0) { widget.sinkEvents(eventsToSink); } }
java
public final void sinkEvents(Widget widget, Set<String> typeNames) { if (typeNames == null) { return; } int eventsToSink = 0; for (String typeName : typeNames) { int typeInt = Event.getTypeInt(typeName); if (typeInt < 0) { widget.sinkBitlessEvent(typeName); } else { typeInt = sinkEvent(widget, typeName); if (typeInt > 0) { eventsToSink |= typeInt; } } } if (eventsToSink > 0) { widget.sinkEvents(eventsToSink); } }
[ "public", "final", "void", "sinkEvents", "(", "Widget", "widget", ",", "Set", "<", "String", ">", "typeNames", ")", "{", "if", "(", "typeNames", "==", "null", ")", "{", "return", ";", "}", "int", "eventsToSink", "=", "0", ";", "for", "(", "String", "...
Sink events on the widget. @param widget the {@link Widget} that will handle the events @param typeNames the names of the events to sink
[ "Sink", "events", "on", "the", "widget", "." ]
1352cafdcbff747bc1f302e709ed376df6642ef5
https://github.com/GwtMaterialDesign/gwt-material-table/blob/1352cafdcbff747bc1f302e709ed376df6642ef5/src/main/java/gwt/material/design/client/ui/table/CellBasedWidgetImpl.java#L133-L153
3,701
GwtMaterialDesign/gwt-material-table
src/main/java/gwt/material/design/client/base/InterruptibleTask.java
InterruptibleTask.delay
public void delay(int delay) { timer.cancel(); if (delay > 0) { timer.schedule(delay); } else { timer.run(); } }
java
public void delay(int delay) { timer.cancel(); if (delay > 0) { timer.schedule(delay); } else { timer.run(); } }
[ "public", "void", "delay", "(", "int", "delay", ")", "{", "timer", ".", "cancel", "(", ")", ";", "if", "(", "delay", ">", "0", ")", "{", "timer", ".", "schedule", "(", "delay", ")", ";", "}", "else", "{", "timer", ".", "run", "(", ")", ";", "...
Cancels any running timers and starts a new one. @param delay the delay in ms
[ "Cancels", "any", "running", "timers", "and", "starts", "a", "new", "one", "." ]
1352cafdcbff747bc1f302e709ed376df6642ef5
https://github.com/GwtMaterialDesign/gwt-material-table/blob/1352cafdcbff747bc1f302e709ed376df6642ef5/src/main/java/gwt/material/design/client/base/InterruptibleTask.java#L56-L63
3,702
GwtMaterialDesign/gwt-material-table
src/main/java/gwt/material/design/client/ui/table/AbstractTableScaffolding.java
AbstractTableScaffolding.apply
@Override public void apply(HasWidgets container) { container.clear(); container.add(topPanel); container.add(tableBody); container.add(xScrollPanel); topPanel.add(infoPanel); topPanel.add(toolPanel); tableBody.add(wrapInnerScroll(table)); table.addHead(new MaterialWidget(DOM.createElement("thead"))); table.addBody(new MaterialWidget(DOM.createElement("tbody"))); }
java
@Override public void apply(HasWidgets container) { container.clear(); container.add(topPanel); container.add(tableBody); container.add(xScrollPanel); topPanel.add(infoPanel); topPanel.add(toolPanel); tableBody.add(wrapInnerScroll(table)); table.addHead(new MaterialWidget(DOM.createElement("thead"))); table.addBody(new MaterialWidget(DOM.createElement("tbody"))); }
[ "@", "Override", "public", "void", "apply", "(", "HasWidgets", "container", ")", "{", "container", ".", "clear", "(", ")", ";", "container", ".", "add", "(", "topPanel", ")", ";", "container", ".", "add", "(", "tableBody", ")", ";", "container", ".", "...
Apply the scaffolding together. @param container the base container for the scaffolding.
[ "Apply", "the", "scaffolding", "together", "." ]
1352cafdcbff747bc1f302e709ed376df6642ef5
https://github.com/GwtMaterialDesign/gwt-material-table/blob/1352cafdcbff747bc1f302e709ed376df6642ef5/src/main/java/gwt/material/design/client/ui/table/AbstractTableScaffolding.java#L101-L115
3,703
GwtMaterialDesign/gwt-material-table
src/main/java/gwt/material/design/client/data/component/CategoryComponent.java
CategoryComponent.render
public final TableSubHeader render(int columnCount) { TableSubHeader element = getWidget(); if(element == null) { element = new TableSubHeader(this, columnCount); setWidget(element); } render(element, columnCount); return element; }
java
public final TableSubHeader render(int columnCount) { TableSubHeader element = getWidget(); if(element == null) { element = new TableSubHeader(this, columnCount); setWidget(element); } render(element, columnCount); return element; }
[ "public", "final", "TableSubHeader", "render", "(", "int", "columnCount", ")", "{", "TableSubHeader", "element", "=", "getWidget", "(", ")", ";", "if", "(", "element", "==", "null", ")", "{", "element", "=", "new", "TableSubHeader", "(", "this", ",", "colu...
Render the data category row element. @return a fully formed {@link TableSubHeader} object.
[ "Render", "the", "data", "category", "row", "element", "." ]
1352cafdcbff747bc1f302e709ed376df6642ef5
https://github.com/GwtMaterialDesign/gwt-material-table/blob/1352cafdcbff747bc1f302e709ed376df6642ef5/src/main/java/gwt/material/design/client/data/component/CategoryComponent.java#L111-L120
3,704
GwtMaterialDesign/gwt-material-table
src/main/java/gwt/material/design/client/ui/pager/MaterialDataPager.java
MaterialDataPager.onLoad
@Override protected void onLoad() { super.onLoad(); if (limit == 0) { limit = limitOptions[0]; } add(actionsPanel); add(rowSelection); if (pageSelection == null) { pageSelection = new PageNumberBox(this); } add(pageSelection); firstPage(); }
java
@Override protected void onLoad() { super.onLoad(); if (limit == 0) { limit = limitOptions[0]; } add(actionsPanel); add(rowSelection); if (pageSelection == null) { pageSelection = new PageNumberBox(this); } add(pageSelection); firstPage(); }
[ "@", "Override", "protected", "void", "onLoad", "(", ")", "{", "super", ".", "onLoad", "(", ")", ";", "if", "(", "limit", "==", "0", ")", "{", "limit", "=", "limitOptions", "[", "0", "]", ";", "}", "add", "(", "actionsPanel", ")", ";", "add", "("...
Initialize the data pager for navigation
[ "Initialize", "the", "data", "pager", "for", "navigation" ]
1352cafdcbff747bc1f302e709ed376df6642ef5
https://github.com/GwtMaterialDesign/gwt-material-table/blob/1352cafdcbff747bc1f302e709ed376df6642ef5/src/main/java/gwt/material/design/client/ui/pager/MaterialDataPager.java#L69-L86
3,705
GwtMaterialDesign/gwt-material-table
src/main/java/gwt/material/design/client/ui/pager/MaterialDataPager.java
MaterialDataPager.doLoad
protected void doLoad(int offset, int limit) { dataSource.load(new LoadConfig<>(offset, limit, table.getView().getSortContext(), table.getView().getOpenCategories()), new LoadCallback<T>() { @Override public void onSuccess(LoadResult<T> loadResult) { setOffset(loadResult.getOffset()); totalRows = loadResult.getTotalLength(); table.setVisibleRange(loadResult.getOffset(), loadResult.getData().size()); table.loaded(loadResult.getOffset(), loadResult.getData()); updateUi(); } @Override public void onFailure(Throwable caught) { GWT.log("Load failure", caught); //TODO: What we need to do on failure? May be clear table? } }); }
java
protected void doLoad(int offset, int limit) { dataSource.load(new LoadConfig<>(offset, limit, table.getView().getSortContext(), table.getView().getOpenCategories()), new LoadCallback<T>() { @Override public void onSuccess(LoadResult<T> loadResult) { setOffset(loadResult.getOffset()); totalRows = loadResult.getTotalLength(); table.setVisibleRange(loadResult.getOffset(), loadResult.getData().size()); table.loaded(loadResult.getOffset(), loadResult.getData()); updateUi(); } @Override public void onFailure(Throwable caught) { GWT.log("Load failure", caught); //TODO: What we need to do on failure? May be clear table? } }); }
[ "protected", "void", "doLoad", "(", "int", "offset", ",", "int", "limit", ")", "{", "dataSource", ".", "load", "(", "new", "LoadConfig", "<>", "(", "offset", ",", "limit", ",", "table", ".", "getView", "(", ")", ".", "getSortContext", "(", ")", ",", ...
Load the datasource within a given offset and limit
[ "Load", "the", "datasource", "within", "a", "given", "offset", "and", "limit" ]
1352cafdcbff747bc1f302e709ed376df6642ef5
https://github.com/GwtMaterialDesign/gwt-material-table/blob/1352cafdcbff747bc1f302e709ed376df6642ef5/src/main/java/gwt/material/design/client/ui/pager/MaterialDataPager.java#L202-L220
3,706
GwtMaterialDesign/gwt-material-table
src/main/java/gwt/material/design/client/ui/pager/MaterialDataPager.java
MaterialDataPager.updateUi
protected void updateUi() { pageSelection.updatePageNumber(currentPage); pageSelection.updateTotalPages(getTotalPages()); // Action label (current selection) in either the form "x-y of z" or "y of z" (when page has only 1 record) int firstRow = offset + 1; int lastRow = (isExcess() & isLastPage()) ? totalRows : (offset + limit); actionsPanel.getActionLabel().setText((firstRow == lastRow ? lastRow : firstRow + "-" + lastRow) + " of " + totalRows); actionsPanel.getIconNext().setEnabled(true); actionsPanel.getIconPrev().setEnabled(true); if (!isNext()) { actionsPanel.getIconNext().setEnabled(false); } if (!isPrevious()) { actionsPanel.getIconPrev().setEnabled(false); } }
java
protected void updateUi() { pageSelection.updatePageNumber(currentPage); pageSelection.updateTotalPages(getTotalPages()); // Action label (current selection) in either the form "x-y of z" or "y of z" (when page has only 1 record) int firstRow = offset + 1; int lastRow = (isExcess() & isLastPage()) ? totalRows : (offset + limit); actionsPanel.getActionLabel().setText((firstRow == lastRow ? lastRow : firstRow + "-" + lastRow) + " of " + totalRows); actionsPanel.getIconNext().setEnabled(true); actionsPanel.getIconPrev().setEnabled(true); if (!isNext()) { actionsPanel.getIconNext().setEnabled(false); } if (!isPrevious()) { actionsPanel.getIconPrev().setEnabled(false); } }
[ "protected", "void", "updateUi", "(", ")", "{", "pageSelection", ".", "updatePageNumber", "(", "currentPage", ")", ";", "pageSelection", ".", "updateTotalPages", "(", "getTotalPages", "(", ")", ")", ";", "// Action label (current selection) in either the form \"x-y of z\"...
Set and update the ui fields of the pager after the datasource load callback
[ "Set", "and", "update", "the", "ui", "fields", "of", "the", "pager", "after", "the", "datasource", "load", "callback" ]
1352cafdcbff747bc1f302e709ed376df6642ef5
https://github.com/GwtMaterialDesign/gwt-material-table/blob/1352cafdcbff747bc1f302e709ed376df6642ef5/src/main/java/gwt/material/design/client/ui/pager/MaterialDataPager.java#L225-L244
3,707
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/tools/Model.java
Model.setSize
public void setSize(final int X, final int Y, final int WIDTH, final int HEIGHT) { bounds.setBounds(X, Y, WIDTH, HEIGHT); fireStateChanged(); }
java
public void setSize(final int X, final int Y, final int WIDTH, final int HEIGHT) { bounds.setBounds(X, Y, WIDTH, HEIGHT); fireStateChanged(); }
[ "public", "void", "setSize", "(", "final", "int", "X", ",", "final", "int", "Y", ",", "final", "int", "WIDTH", ",", "final", "int", "HEIGHT", ")", "{", "bounds", ".", "setBounds", "(", "X", ",", "Y", ",", "WIDTH", ",", "HEIGHT", ")", ";", "fireStat...
Sets the width and height of the gauge @param X @param Y @param WIDTH @param HEIGHT
[ "Sets", "the", "width", "and", "height", "of", "the", "gauge" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/tools/Model.java#L337-L340
3,708
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/tools/Model.java
Model.setMinValue
public void setMinValue(final double MIN_VALUE) { // check min-max values if (Double.compare(MIN_VALUE, maxValue) == 0) { throw new IllegalArgumentException("Min value cannot be equal to max value"); } if (Double.compare(MIN_VALUE, maxValue) > 0) { minValue = maxValue; maxValue = MIN_VALUE; } else { minValue = MIN_VALUE; } calculate(); validate(); calcAngleStep(); fireStateChanged(); }
java
public void setMinValue(final double MIN_VALUE) { // check min-max values if (Double.compare(MIN_VALUE, maxValue) == 0) { throw new IllegalArgumentException("Min value cannot be equal to max value"); } if (Double.compare(MIN_VALUE, maxValue) > 0) { minValue = maxValue; maxValue = MIN_VALUE; } else { minValue = MIN_VALUE; } calculate(); validate(); calcAngleStep(); fireStateChanged(); }
[ "public", "void", "setMinValue", "(", "final", "double", "MIN_VALUE", ")", "{", "// check min-max values", "if", "(", "Double", ".", "compare", "(", "MIN_VALUE", ",", "maxValue", ")", "==", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Min...
Sets the minium value that will be used for the calculation of the nice minimum value for the scale. @param MIN_VALUE
[ "Sets", "the", "minium", "value", "that", "will", "be", "used", "for", "the", "calculation", "of", "the", "nice", "minimum", "value", "for", "the", "scale", "." ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/tools/Model.java#L355-L371
3,709
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/tools/Model.java
Model.setMaxValue
public void setMaxValue(final double MAX_VALUE) { // check min-max values if (Double.compare(MAX_VALUE, minValue) == 0) { throw new IllegalArgumentException("Max value cannot be equal to min value"); } if (Double.compare(MAX_VALUE, minValue) < 0) { maxValue = minValue; minValue = MAX_VALUE; } else { maxValue = MAX_VALUE; } calculate(); validate(); calcAngleStep(); fireStateChanged(); }
java
public void setMaxValue(final double MAX_VALUE) { // check min-max values if (Double.compare(MAX_VALUE, minValue) == 0) { throw new IllegalArgumentException("Max value cannot be equal to min value"); } if (Double.compare(MAX_VALUE, minValue) < 0) { maxValue = minValue; minValue = MAX_VALUE; } else { maxValue = MAX_VALUE; } calculate(); validate(); calcAngleStep(); fireStateChanged(); }
[ "public", "void", "setMaxValue", "(", "final", "double", "MAX_VALUE", ")", "{", "// check min-max values", "if", "(", "Double", ".", "compare", "(", "MAX_VALUE", ",", "minValue", ")", "==", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Max...
Sets the maximum value that will be used for the calculation of the nice maximum vlaue for the scale. @param MAX_VALUE
[ "Sets", "the", "maximum", "value", "that", "will", "be", "used", "for", "the", "calculation", "of", "the", "nice", "maximum", "vlaue", "for", "the", "scale", "." ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/tools/Model.java#L386-L402
3,710
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/tools/Model.java
Model.setRange
public void setRange(final double MIN_VALUE, final double MAX_VALUE) { maxValue = MAX_VALUE; minValue = MIN_VALUE; calculate(); validate(); calcAngleStep(); fireStateChanged(); }
java
public void setRange(final double MIN_VALUE, final double MAX_VALUE) { maxValue = MAX_VALUE; minValue = MIN_VALUE; calculate(); validate(); calcAngleStep(); fireStateChanged(); }
[ "public", "void", "setRange", "(", "final", "double", "MIN_VALUE", ",", "final", "double", "MAX_VALUE", ")", "{", "maxValue", "=", "MAX_VALUE", ";", "minValue", "=", "MIN_VALUE", ";", "calculate", "(", ")", ";", "validate", "(", ")", ";", "calcAngleStep", ...
Sets the minimum and maximum value for the calculation of the nice minimum and nice maximum values. @param MIN_VALUE @param MAX_VALUE
[ "Sets", "the", "minimum", "and", "maximum", "value", "for", "the", "calculation", "of", "the", "nice", "minimum", "and", "nice", "maximum", "values", "." ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/tools/Model.java#L418-L425
3,711
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/tools/Model.java
Model.setValue
public void setValue(final double VALUE) { oldValue = value; value = VALUE < niceMinValue ? niceMinValue : (VALUE > niceMaxValue ? niceMaxValue : VALUE); fireStateChanged(); }
java
public void setValue(final double VALUE) { oldValue = value; value = VALUE < niceMinValue ? niceMinValue : (VALUE > niceMaxValue ? niceMaxValue : VALUE); fireStateChanged(); }
[ "public", "void", "setValue", "(", "final", "double", "VALUE", ")", "{", "oldValue", "=", "value", ";", "value", "=", "VALUE", "<", "niceMinValue", "?", "niceMinValue", ":", "(", "VALUE", ">", "niceMaxValue", "?", "niceMaxValue", ":", "VALUE", ")", ";", ...
Sets the current value of the gauge @param VALUE
[ "Sets", "the", "current", "value", "of", "the", "gauge" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/tools/Model.java#L439-L445
3,712
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/tools/Model.java
Model.setRedrawTolerance
public void setRedrawTolerance(final double REDRAW_TOLERANCE) { redrawTolerance = REDRAW_TOLERANCE < 0 ? 0 : (REDRAW_TOLERANCE > 1 ? 1.0 : REDRAW_TOLERANCE); redrawFactor = redrawTolerance * getRange(); fireStateChanged(); }
java
public void setRedrawTolerance(final double REDRAW_TOLERANCE) { redrawTolerance = REDRAW_TOLERANCE < 0 ? 0 : (REDRAW_TOLERANCE > 1 ? 1.0 : REDRAW_TOLERANCE); redrawFactor = redrawTolerance * getRange(); fireStateChanged(); }
[ "public", "void", "setRedrawTolerance", "(", "final", "double", "REDRAW_TOLERANCE", ")", "{", "redrawTolerance", "=", "REDRAW_TOLERANCE", "<", "0", "?", "0", ":", "(", "REDRAW_TOLERANCE", ">", "1", "?", "1.0", ":", "REDRAW_TOLERANCE", ")", ";", "redrawFactor", ...
Sets the redraw tolerance @param REDRAW_TOLERANCE
[ "Sets", "the", "redraw", "tolerance" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/tools/Model.java#L471-L475
3,713
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/tools/Model.java
Model.setThreshold
public void setThreshold(final double THRESHOLD) { if (Double.compare(THRESHOLD, minValue) >= 0 && Double.compare(THRESHOLD, maxValue) <= 0) { threshold = THRESHOLD; } else { if (THRESHOLD < niceMinValue) { threshold = niceMinValue; } if (THRESHOLD > niceMaxValue) { threshold = niceMaxValue; } } fireStateChanged(); }
java
public void setThreshold(final double THRESHOLD) { if (Double.compare(THRESHOLD, minValue) >= 0 && Double.compare(THRESHOLD, maxValue) <= 0) { threshold = THRESHOLD; } else { if (THRESHOLD < niceMinValue) { threshold = niceMinValue; } if (THRESHOLD > niceMaxValue) { threshold = niceMaxValue; } } fireStateChanged(); }
[ "public", "void", "setThreshold", "(", "final", "double", "THRESHOLD", ")", "{", "if", "(", "Double", ".", "compare", "(", "THRESHOLD", ",", "minValue", ")", ">=", "0", "&&", "Double", ".", "compare", "(", "THRESHOLD", ",", "maxValue", ")", "<=", "0", ...
Sets the value for the threshold of the gauge @param THRESHOLD
[ "Sets", "the", "value", "for", "the", "threshold", "of", "the", "gauge" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/tools/Model.java#L1099-L1112
3,714
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/tools/Model.java
Model.setMinMeasuredValue
public void setMinMeasuredValue(final double MIN_MEASURED_VALUE) { if (Double.compare(MIN_MEASURED_VALUE, niceMinValue) >= 0 && Double.compare(MIN_MEASURED_VALUE, niceMaxValue) <= 0) { minMeasuredValue = MIN_MEASURED_VALUE; } else { if (MIN_MEASURED_VALUE < niceMinValue) { minMeasuredValue = niceMinValue; } if (MIN_MEASURED_VALUE > niceMaxValue) { minMeasuredValue = niceMaxValue; } } createRadialShapeOfMeasureValuesArea(); fireStateChanged(); }
java
public void setMinMeasuredValue(final double MIN_MEASURED_VALUE) { if (Double.compare(MIN_MEASURED_VALUE, niceMinValue) >= 0 && Double.compare(MIN_MEASURED_VALUE, niceMaxValue) <= 0) { minMeasuredValue = MIN_MEASURED_VALUE; } else { if (MIN_MEASURED_VALUE < niceMinValue) { minMeasuredValue = niceMinValue; } if (MIN_MEASURED_VALUE > niceMaxValue) { minMeasuredValue = niceMaxValue; } } createRadialShapeOfMeasureValuesArea(); fireStateChanged(); }
[ "public", "void", "setMinMeasuredValue", "(", "final", "double", "MIN_MEASURED_VALUE", ")", "{", "if", "(", "Double", ".", "compare", "(", "MIN_MEASURED_VALUE", ",", "niceMinValue", ")", ">=", "0", "&&", "Double", ".", "compare", "(", "MIN_MEASURED_VALUE", ",", ...
Sets the minimum measured value of the gauge to the given value @param MIN_MEASURED_VALUE
[ "Sets", "the", "minimum", "measured", "value", "of", "the", "gauge", "to", "the", "given", "value" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/tools/Model.java#L1213-L1227
3,715
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/tools/Model.java
Model.resetMinMeasuredValue
public void resetMinMeasuredValue(final double MIN_MEASURED_VALUE) { minMeasuredValue = MIN_MEASURED_VALUE < niceMinValue ? niceMinValue : (MIN_MEASURED_VALUE > niceMaxValue ? niceMaxValue : MIN_MEASURED_VALUE); createRadialShapeOfMeasureValuesArea(); fireStateChanged(); }
java
public void resetMinMeasuredValue(final double MIN_MEASURED_VALUE) { minMeasuredValue = MIN_MEASURED_VALUE < niceMinValue ? niceMinValue : (MIN_MEASURED_VALUE > niceMaxValue ? niceMaxValue : MIN_MEASURED_VALUE); createRadialShapeOfMeasureValuesArea(); fireStateChanged(); }
[ "public", "void", "resetMinMeasuredValue", "(", "final", "double", "MIN_MEASURED_VALUE", ")", "{", "minMeasuredValue", "=", "MIN_MEASURED_VALUE", "<", "niceMinValue", "?", "niceMinValue", ":", "(", "MIN_MEASURED_VALUE", ">", "niceMaxValue", "?", "niceMaxValue", ":", "...
Resets the minimum measured value of the gauge to the given value @param MIN_MEASURED_VALUE
[ "Resets", "the", "minimum", "measured", "value", "of", "the", "gauge", "to", "the", "given", "value" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/tools/Model.java#L1242-L1246
3,716
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/tools/Model.java
Model.setMaxMeasuredValue
public void setMaxMeasuredValue(final double MAX_MEASURED_VALUE) { if (Double.compare(MAX_MEASURED_VALUE, niceMinValue) >= 0 && Double.compare(MAX_MEASURED_VALUE, niceMaxValue) <= 0) { maxMeasuredValue = MAX_MEASURED_VALUE; } else { if (MAX_MEASURED_VALUE < niceMinValue) { maxMeasuredValue = niceMinValue; } if (MAX_MEASURED_VALUE > niceMaxValue) { maxMeasuredValue = niceMaxValue; } } createRadialShapeOfMeasureValuesArea(); fireStateChanged(); }
java
public void setMaxMeasuredValue(final double MAX_MEASURED_VALUE) { if (Double.compare(MAX_MEASURED_VALUE, niceMinValue) >= 0 && Double.compare(MAX_MEASURED_VALUE, niceMaxValue) <= 0) { maxMeasuredValue = MAX_MEASURED_VALUE; } else { if (MAX_MEASURED_VALUE < niceMinValue) { maxMeasuredValue = niceMinValue; } if (MAX_MEASURED_VALUE > niceMaxValue) { maxMeasuredValue = niceMaxValue; } } createRadialShapeOfMeasureValuesArea(); fireStateChanged(); }
[ "public", "void", "setMaxMeasuredValue", "(", "final", "double", "MAX_MEASURED_VALUE", ")", "{", "if", "(", "Double", ".", "compare", "(", "MAX_MEASURED_VALUE", ",", "niceMinValue", ")", ">=", "0", "&&", "Double", ".", "compare", "(", "MAX_MEASURED_VALUE", ",", ...
Sets the maximum measured value of the gauge to the given value @param MAX_MEASURED_VALUE
[ "Sets", "the", "maximum", "measured", "value", "of", "the", "gauge", "to", "the", "given", "value" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/tools/Model.java#L1277-L1291
3,717
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/tools/Model.java
Model.resetMaxMeasuredValue
public void resetMaxMeasuredValue(final double MAX_MEASURED_VALUE) { maxMeasuredValue = MAX_MEASURED_VALUE < niceMinValue ? niceMinValue : (MAX_MEASURED_VALUE > niceMaxValue ? niceMaxValue : MAX_MEASURED_VALUE); createRadialShapeOfMeasureValuesArea(); fireStateChanged(); }
java
public void resetMaxMeasuredValue(final double MAX_MEASURED_VALUE) { maxMeasuredValue = MAX_MEASURED_VALUE < niceMinValue ? niceMinValue : (MAX_MEASURED_VALUE > niceMaxValue ? niceMaxValue : MAX_MEASURED_VALUE); createRadialShapeOfMeasureValuesArea(); fireStateChanged(); }
[ "public", "void", "resetMaxMeasuredValue", "(", "final", "double", "MAX_MEASURED_VALUE", ")", "{", "maxMeasuredValue", "=", "MAX_MEASURED_VALUE", "<", "niceMinValue", "?", "niceMinValue", ":", "(", "MAX_MEASURED_VALUE", ">", "niceMaxValue", "?", "niceMaxValue", ":", "...
Resets the maximum measured value of the gauge to the given value @param MAX_MEASURED_VALUE
[ "Resets", "the", "maximum", "measured", "value", "of", "the", "gauge", "to", "the", "given", "value" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/tools/Model.java#L1306-L1310
3,718
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/tools/Model.java
Model.setTrackStart
public void setTrackStart(final double TRACK_START) { // check values if (Double.compare(TRACK_START, trackStop) == 0) { throw new IllegalArgumentException("Track start value cannot equal track stop value"); } trackStart = TRACK_START; validate(); fireStateChanged(); }
java
public void setTrackStart(final double TRACK_START) { // check values if (Double.compare(TRACK_START, trackStop) == 0) { throw new IllegalArgumentException("Track start value cannot equal track stop value"); } trackStart = TRACK_START; validate(); fireStateChanged(); }
[ "public", "void", "setTrackStart", "(", "final", "double", "TRACK_START", ")", "{", "// check values", "if", "(", "Double", ".", "compare", "(", "TRACK_START", ",", "trackStop", ")", "==", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Trac...
Sets the track start value of the gauge to the given value @param TRACK_START
[ "Sets", "the", "track", "start", "value", "of", "the", "gauge", "to", "the", "given", "value" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/tools/Model.java#L1408-L1416
3,719
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/tools/Model.java
Model.setTrackStop
public void setTrackStop(final double TRACK_STOP) { // check values if (Double.compare(trackStart, TRACK_STOP) == 0) { throw new IllegalArgumentException("Track stop value cannot equal track start value"); } trackStop = TRACK_STOP; validate(); fireStateChanged(); }
java
public void setTrackStop(final double TRACK_STOP) { // check values if (Double.compare(trackStart, TRACK_STOP) == 0) { throw new IllegalArgumentException("Track stop value cannot equal track start value"); } trackStop = TRACK_STOP; validate(); fireStateChanged(); }
[ "public", "void", "setTrackStop", "(", "final", "double", "TRACK_STOP", ")", "{", "// check values", "if", "(", "Double", ".", "compare", "(", "trackStart", ",", "TRACK_STOP", ")", "==", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Track ...
Sets the track stop value of the gauge to the given value @param TRACK_STOP
[ "Sets", "the", "track", "stop", "value", "of", "the", "gauge", "to", "the", "given", "value" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/tools/Model.java#L1448-L1456
3,720
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/tools/Model.java
Model.setSections
public void setSections(Section... SECTIONS_ARRAY) { sections.clear(); for (Section section : SECTIONS_ARRAY) { sections.add(new Section(section.getStart(), section.getStop(), section.getColor())); } validate(); fireStateChanged(); }
java
public void setSections(Section... SECTIONS_ARRAY) { sections.clear(); for (Section section : SECTIONS_ARRAY) { sections.add(new Section(section.getStart(), section.getStop(), section.getColor())); } validate(); fireStateChanged(); }
[ "public", "void", "setSections", "(", "Section", "...", "SECTIONS_ARRAY", ")", "{", "sections", ".", "clear", "(", ")", ";", "for", "(", "Section", "section", ":", "SECTIONS_ARRAY", ")", "{", "sections", ".", "add", "(", "new", "Section", "(", "section", ...
Sets the sections of the gauge to the given array of section objects @param SECTIONS_ARRAY
[ "Sets", "the", "sections", "of", "the", "gauge", "to", "the", "given", "array", "of", "section", "objects" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/tools/Model.java#L1490-L1497
3,721
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/tools/Model.java
Model.getAreas
public List<Section> getAreas() { List<Section> areasCopy = new ArrayList<Section>(10); areasCopy.addAll(areas); return areasCopy; }
java
public List<Section> getAreas() { List<Section> areasCopy = new ArrayList<Section>(10); areasCopy.addAll(areas); return areasCopy; }
[ "public", "List", "<", "Section", ">", "getAreas", "(", ")", "{", "List", "<", "Section", ">", "areasCopy", "=", "new", "ArrayList", "<", "Section", ">", "(", "10", ")", ";", "areasCopy", ".", "addAll", "(", "areas", ")", ";", "return", "areasCopy", ...
Returns a list of section objects that will used to display the areas of a gauge with their colors. @return a list of section objects that will represent the areas of the gauge
[ "Returns", "a", "list", "of", "section", "objects", "that", "will", "used", "to", "display", "the", "areas", "of", "a", "gauge", "with", "their", "colors", "." ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/tools/Model.java#L1556-L1560
3,722
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/tools/Model.java
Model.setAreas
public void setAreas(Section... AREAS_ARRAY) { areas.clear(); for (Section area : AREAS_ARRAY) { areas.add(new Section(area.getStart(), area.getStop(), area.getColor())); } validate(); fireStateChanged(); }
java
public void setAreas(Section... AREAS_ARRAY) { areas.clear(); for (Section area : AREAS_ARRAY) { areas.add(new Section(area.getStart(), area.getStop(), area.getColor())); } validate(); fireStateChanged(); }
[ "public", "void", "setAreas", "(", "Section", "...", "AREAS_ARRAY", ")", "{", "areas", ".", "clear", "(", ")", ";", "for", "(", "Section", "area", ":", "AREAS_ARRAY", ")", "{", "areas", ".", "add", "(", "new", "Section", "(", "area", ".", "getStart", ...
Sets the areas of the gauge to the given array of section objects @param AREAS_ARRAY
[ "Sets", "the", "areas", "of", "the", "gauge", "to", "the", "given", "array", "of", "section", "objects" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/tools/Model.java#L1566-L1573
3,723
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/tools/Model.java
Model.getTickmarkSections
public List<Section> getTickmarkSections() { List<Section> tickmarkSectionsCopy = new ArrayList<Section>(10); tickmarkSectionsCopy.addAll(tickmarkSections); return tickmarkSectionsCopy; }
java
public List<Section> getTickmarkSections() { List<Section> tickmarkSectionsCopy = new ArrayList<Section>(10); tickmarkSectionsCopy.addAll(tickmarkSections); return tickmarkSectionsCopy; }
[ "public", "List", "<", "Section", ">", "getTickmarkSections", "(", ")", "{", "List", "<", "Section", ">", "tickmarkSectionsCopy", "=", "new", "ArrayList", "<", "Section", ">", "(", "10", ")", ";", "tickmarkSectionsCopy", ".", "addAll", "(", "tickmarkSections",...
Returns a list of section objects that will be used to display to display the tickmark sections of a gauge with their different colors. @return a list of section objects that represents the tickmark sections of the gauge
[ "Returns", "a", "list", "of", "section", "objects", "that", "will", "be", "used", "to", "display", "to", "display", "the", "tickmark", "sections", "of", "a", "gauge", "with", "their", "different", "colors", "." ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/tools/Model.java#L1630-L1634
3,724
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/tools/Model.java
Model.setTickmarkSections
public void setTickmarkSections(final Section... TICKMARK_SECTIONS_ARRAY) { tickmarkSections.clear(); for (Section tickmarkSection : TICKMARK_SECTIONS_ARRAY) { tickmarkSections.add(new Section(tickmarkSection.getStart(), tickmarkSection.getStop(), tickmarkSection.getColor())); } validate(); fireStateChanged(); }
java
public void setTickmarkSections(final Section... TICKMARK_SECTIONS_ARRAY) { tickmarkSections.clear(); for (Section tickmarkSection : TICKMARK_SECTIONS_ARRAY) { tickmarkSections.add(new Section(tickmarkSection.getStart(), tickmarkSection.getStop(), tickmarkSection.getColor())); } validate(); fireStateChanged(); }
[ "public", "void", "setTickmarkSections", "(", "final", "Section", "...", "TICKMARK_SECTIONS_ARRAY", ")", "{", "tickmarkSections", ".", "clear", "(", ")", ";", "for", "(", "Section", "tickmarkSection", ":", "TICKMARK_SECTIONS_ARRAY", ")", "{", "tickmarkSections", "."...
Sets the tickmark sections of the gauge to the given array of section objects @param TICKMARK_SECTIONS_ARRAY
[ "Sets", "the", "tickmark", "sections", "of", "the", "gauge", "to", "the", "given", "array", "of", "section", "objects" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/tools/Model.java#L1640-L1647
3,725
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/tools/Model.java
Model.setMinMaxAndNoOfTicks
public void setMinMaxAndNoOfTicks(final double MIN_VALUE, final double MAX_VALUE, final int NO_OF_MINOR_TICKS, final int NO_OF_MAJOR_TICKS) { this.maxNoOfMinorTicks = NO_OF_MINOR_TICKS; this.maxNoOfMajorTicks = NO_OF_MAJOR_TICKS; this.minValue = MIN_VALUE; this.maxValue = MAX_VALUE; calculate(); }
java
public void setMinMaxAndNoOfTicks(final double MIN_VALUE, final double MAX_VALUE, final int NO_OF_MINOR_TICKS, final int NO_OF_MAJOR_TICKS) { this.maxNoOfMinorTicks = NO_OF_MINOR_TICKS; this.maxNoOfMajorTicks = NO_OF_MAJOR_TICKS; this.minValue = MIN_VALUE; this.maxValue = MAX_VALUE; calculate(); }
[ "public", "void", "setMinMaxAndNoOfTicks", "(", "final", "double", "MIN_VALUE", ",", "final", "double", "MAX_VALUE", ",", "final", "int", "NO_OF_MINOR_TICKS", ",", "final", "int", "NO_OF_MAJOR_TICKS", ")", "{", "this", ".", "maxNoOfMinorTicks", "=", "NO_OF_MINOR_TIC...
Sets the minimum and maximum values and the number of minor and major tickmarks of the gauge dial @param MIN_VALUE @param MAX_VALUE @param NO_OF_MINOR_TICKS @param NO_OF_MAJOR_TICKS
[ "Sets", "the", "minimum", "and", "maximum", "values", "and", "the", "number", "of", "minor", "and", "major", "tickmarks", "of", "the", "gauge", "dial" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/tools/Model.java#L1788-L1795
3,726
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/tools/Model.java
Model.setMaxNoOfMajorTicks
public void setMaxNoOfMajorTicks(final int MAX_NO_OF_MAJOR_TICKS) { if (MAX_NO_OF_MAJOR_TICKS > 20) { this.maxNoOfMajorTicks = 20; } else if (MAX_NO_OF_MAJOR_TICKS < 2) { this.maxNoOfMajorTicks = 2; } else { this.maxNoOfMajorTicks = MAX_NO_OF_MAJOR_TICKS; } calculate(); fireStateChanged(); }
java
public void setMaxNoOfMajorTicks(final int MAX_NO_OF_MAJOR_TICKS) { if (MAX_NO_OF_MAJOR_TICKS > 20) { this.maxNoOfMajorTicks = 20; } else if (MAX_NO_OF_MAJOR_TICKS < 2) { this.maxNoOfMajorTicks = 2; } else { this.maxNoOfMajorTicks = MAX_NO_OF_MAJOR_TICKS; } calculate(); fireStateChanged(); }
[ "public", "void", "setMaxNoOfMajorTicks", "(", "final", "int", "MAX_NO_OF_MAJOR_TICKS", ")", "{", "if", "(", "MAX_NO_OF_MAJOR_TICKS", ">", "20", ")", "{", "this", ".", "maxNoOfMajorTicks", "=", "20", ";", "}", "else", "if", "(", "MAX_NO_OF_MAJOR_TICKS", "<", "...
Sets the maximum number of major tickmarks we're comfortable with @param MAX_NO_OF_MAJOR_TICKS the maximum number of major tickmarks for the axis
[ "Sets", "the", "maximum", "number", "of", "major", "tickmarks", "we", "re", "comfortable", "with" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/tools/Model.java#L1809-L1819
3,727
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/tools/Model.java
Model.setMaxNoOfMinorTicks
public void setMaxNoOfMinorTicks(final int MAX_NO_OF_MINOR_TICKS) { if (MAX_NO_OF_MINOR_TICKS > 10) { this.maxNoOfMinorTicks = 10; } else if (MAX_NO_OF_MINOR_TICKS < 1) { this.maxNoOfMinorTicks = 1; } else { this.maxNoOfMinorTicks = MAX_NO_OF_MINOR_TICKS; } calculate(); fireStateChanged(); }
java
public void setMaxNoOfMinorTicks(final int MAX_NO_OF_MINOR_TICKS) { if (MAX_NO_OF_MINOR_TICKS > 10) { this.maxNoOfMinorTicks = 10; } else if (MAX_NO_OF_MINOR_TICKS < 1) { this.maxNoOfMinorTicks = 1; } else { this.maxNoOfMinorTicks = MAX_NO_OF_MINOR_TICKS; } calculate(); fireStateChanged(); }
[ "public", "void", "setMaxNoOfMinorTicks", "(", "final", "int", "MAX_NO_OF_MINOR_TICKS", ")", "{", "if", "(", "MAX_NO_OF_MINOR_TICKS", ">", "10", ")", "{", "this", ".", "maxNoOfMinorTicks", "=", "10", ";", "}", "else", "if", "(", "MAX_NO_OF_MINOR_TICKS", "<", "...
Sets the maximum number of minor tickmarks we're comfortable with @param MAX_NO_OF_MINOR_TICKS the maxmium number of minor tickmarks for the axis
[ "Sets", "the", "maximum", "number", "of", "minor", "tickmarks", "we", "re", "comfortable", "with" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/tools/Model.java#L1833-L1843
3,728
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/tools/Model.java
Model.setCustomLayer
public void setCustomLayer(final BufferedImage CUSTOM_LAYER) { if (customLayer != null) { customLayer.flush(); } customLayer = CUSTOM_LAYER; fireStateChanged(); }
java
public void setCustomLayer(final BufferedImage CUSTOM_LAYER) { if (customLayer != null) { customLayer.flush(); } customLayer = CUSTOM_LAYER; fireStateChanged(); }
[ "public", "void", "setCustomLayer", "(", "final", "BufferedImage", "CUSTOM_LAYER", ")", "{", "if", "(", "customLayer", "!=", "null", ")", "{", "customLayer", ".", "flush", "(", ")", ";", "}", "customLayer", "=", "CUSTOM_LAYER", ";", "fireStateChanged", "(", ...
Sets the given buffered image as the custom layer of the gauge @param CUSTOM_LAYER
[ "Sets", "the", "given", "buffered", "image", "as", "the", "custom", "layer", "of", "the", "gauge" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/tools/Model.java#L1974-L1980
3,729
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/tools/Model.java
Model.calcAngleStep
private void calcAngleStep() { final double angleRange = getAngleRange(); angleStep = angleRange / range; logAngleStep = angleRange / (Util.INSTANCE.logOfBase(BASE, range)); }
java
private void calcAngleStep() { final double angleRange = getAngleRange(); angleStep = angleRange / range; logAngleStep = angleRange / (Util.INSTANCE.logOfBase(BASE, range)); }
[ "private", "void", "calcAngleStep", "(", ")", "{", "final", "double", "angleRange", "=", "getAngleRange", "(", ")", ";", "angleStep", "=", "angleRange", "/", "range", ";", "logAngleStep", "=", "angleRange", "/", "(", "Util", ".", "INSTANCE", ".", "logOfBase"...
Calculates the stepsize in rad for the given gaugetype and range
[ "Calculates", "the", "stepsize", "in", "rad", "for", "the", "given", "gaugetype", "and", "range" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/tools/Model.java#L2853-L2857
3,730
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/tools/Model.java
Model.calculate
private void calculate() { if (niceScale) { this.niceRange = calcNiceNumber(maxValue - minValue, false); this.majorTickSpacing = calcNiceNumber(niceRange / (maxNoOfMajorTicks - 1), true); this.niceMinValue = Math.floor(minValue / majorTickSpacing) * majorTickSpacing; this.niceMaxValue = Math.ceil(maxValue / majorTickSpacing) * majorTickSpacing; this.minorTickSpacing = calcNiceNumber(majorTickSpacing / (maxNoOfMinorTicks - 1), true); this.range = niceMaxValue - niceMinValue; } else { this.niceRange = (maxValue - minValue); this.niceMinValue = minValue; this.niceMaxValue = maxValue; this.range = this.niceRange; } }
java
private void calculate() { if (niceScale) { this.niceRange = calcNiceNumber(maxValue - minValue, false); this.majorTickSpacing = calcNiceNumber(niceRange / (maxNoOfMajorTicks - 1), true); this.niceMinValue = Math.floor(minValue / majorTickSpacing) * majorTickSpacing; this.niceMaxValue = Math.ceil(maxValue / majorTickSpacing) * majorTickSpacing; this.minorTickSpacing = calcNiceNumber(majorTickSpacing / (maxNoOfMinorTicks - 1), true); this.range = niceMaxValue - niceMinValue; } else { this.niceRange = (maxValue - minValue); this.niceMinValue = minValue; this.niceMaxValue = maxValue; this.range = this.niceRange; } }
[ "private", "void", "calculate", "(", ")", "{", "if", "(", "niceScale", ")", "{", "this", ".", "niceRange", "=", "calcNiceNumber", "(", "maxValue", "-", "minValue", ",", "false", ")", ";", "this", ".", "majorTickSpacing", "=", "calcNiceNumber", "(", "niceRa...
Calculate and update values for majro and minor tick spacing and nice minimum and maximum values on the axis.
[ "Calculate", "and", "update", "values", "for", "majro", "and", "minor", "tick", "spacing", "and", "nice", "minimum", "and", "maximum", "values", "on", "the", "axis", "." ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/tools/Model.java#L2863-L2877
3,731
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/tools/Model.java
Model.calcNiceNumber
private double calcNiceNumber(final double RANGE, final boolean ROUND) { final double EXPONENT = Math.floor(Math.log10(RANGE)); // exponent of range final double FRACTION = RANGE / Math.pow(10, EXPONENT); // fractional part of range // nice, rounded fraction final double NICE_FRACTION; if (ROUND) { if (FRACTION < 1.5) { NICE_FRACTION = 1; } else if (FRACTION < 3) { NICE_FRACTION = 2; } else if (FRACTION < 7) { NICE_FRACTION = 5; } else { NICE_FRACTION = 10; } } else { if (FRACTION <= 1) { NICE_FRACTION = 1; } else if (FRACTION <= 2) { NICE_FRACTION = 2; } else if (FRACTION <= 5) { NICE_FRACTION = 5; } else { NICE_FRACTION = 10; } } return NICE_FRACTION * Math.pow(10, EXPONENT); }
java
private double calcNiceNumber(final double RANGE, final boolean ROUND) { final double EXPONENT = Math.floor(Math.log10(RANGE)); // exponent of range final double FRACTION = RANGE / Math.pow(10, EXPONENT); // fractional part of range // nice, rounded fraction final double NICE_FRACTION; if (ROUND) { if (FRACTION < 1.5) { NICE_FRACTION = 1; } else if (FRACTION < 3) { NICE_FRACTION = 2; } else if (FRACTION < 7) { NICE_FRACTION = 5; } else { NICE_FRACTION = 10; } } else { if (FRACTION <= 1) { NICE_FRACTION = 1; } else if (FRACTION <= 2) { NICE_FRACTION = 2; } else if (FRACTION <= 5) { NICE_FRACTION = 5; } else { NICE_FRACTION = 10; } } return NICE_FRACTION * Math.pow(10, EXPONENT); }
[ "private", "double", "calcNiceNumber", "(", "final", "double", "RANGE", ",", "final", "boolean", "ROUND", ")", "{", "final", "double", "EXPONENT", "=", "Math", ".", "floor", "(", "Math", ".", "log10", "(", "RANGE", ")", ")", ";", "// exponent of range", "f...
Returns a "nice" number approximately equal to the range. Rounds the number if ROUND == true. Takes the ceiling if ROUND = false. @param RANGE the value range (maxValue - minValue) @param ROUND whether to round the result or ceil @return a "nice" number to be used for the value range
[ "Returns", "a", "nice", "number", "approximately", "equal", "to", "the", "range", ".", "Rounds", "the", "number", "if", "ROUND", "==", "true", ".", "Takes", "the", "ceiling", "if", "ROUND", "=", "false", "." ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/tools/Model.java#L2887-L2917
3,732
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/tools/Model.java
Model.addChangeListener
public void addChangeListener(javax.swing.event.ChangeListener LISTENER) { LISTENER_LIST.add(javax.swing.event.ChangeListener.class, LISTENER); }
java
public void addChangeListener(javax.swing.event.ChangeListener LISTENER) { LISTENER_LIST.add(javax.swing.event.ChangeListener.class, LISTENER); }
[ "public", "void", "addChangeListener", "(", "javax", ".", "swing", ".", "event", ".", "ChangeListener", "LISTENER", ")", "{", "LISTENER_LIST", ".", "add", "(", "javax", ".", "swing", ".", "event", ".", "ChangeListener", ".", "class", ",", "LISTENER", ")", ...
Adds the given listener to the listener list @param LISTENER
[ "Adds", "the", "given", "listener", "to", "the", "listener", "list" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/tools/Model.java#L3009-L3011
3,733
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/tools/Model.java
Model.removeChangeListener
public void removeChangeListener(javax.swing.event.ChangeListener LISTENER) { LISTENER_LIST.remove(javax.swing.event.ChangeListener.class, LISTENER); }
java
public void removeChangeListener(javax.swing.event.ChangeListener LISTENER) { LISTENER_LIST.remove(javax.swing.event.ChangeListener.class, LISTENER); }
[ "public", "void", "removeChangeListener", "(", "javax", ".", "swing", ".", "event", ".", "ChangeListener", "LISTENER", ")", "{", "LISTENER_LIST", ".", "remove", "(", "javax", ".", "swing", ".", "event", ".", "ChangeListener", ".", "class", ",", "LISTENER", "...
Removes all listeners from the listener list @param LISTENER
[ "Removes", "all", "listeners", "from", "the", "listener", "list" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/tools/Model.java#L3017-L3019
3,734
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/tools/Model.java
Model.fireStateChanged
protected void fireStateChanged() { Object[] listeners = LISTENER_LIST.getListenerList(); // Process the listeners last to first, notifying // those that are interested in this event for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == javax.swing.event.ChangeListener.class) { if (changeEvent == null) { changeEvent = new javax.swing.event.ChangeEvent(this); } ((javax.swing.event.ChangeListener) listeners[i + 1]).stateChanged(changeEvent); } } }
java
protected void fireStateChanged() { Object[] listeners = LISTENER_LIST.getListenerList(); // Process the listeners last to first, notifying // those that are interested in this event for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == javax.swing.event.ChangeListener.class) { if (changeEvent == null) { changeEvent = new javax.swing.event.ChangeEvent(this); } ((javax.swing.event.ChangeListener) listeners[i + 1]).stateChanged(changeEvent); } } }
[ "protected", "void", "fireStateChanged", "(", ")", "{", "Object", "[", "]", "listeners", "=", "LISTENER_LIST", ".", "getListenerList", "(", ")", ";", "// Process the listeners last to first, notifying", "// those that are interested in this event", "for", "(", "int", "i",...
Fires an state change event every time the data model changes
[ "Fires", "an", "state", "change", "event", "every", "time", "the", "data", "model", "changes" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/tools/Model.java#L3024-L3037
3,735
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractRadialBargraph.java
AbstractRadialBargraph.setBarGraphColor
public void setBarGraphColor(final ColorDef BARGRAPH_COLOR) { getModel().setValueColor(BARGRAPH_COLOR); init(getInnerBounds().width, getInnerBounds().width); repaint(getInnerBounds()); }
java
public void setBarGraphColor(final ColorDef BARGRAPH_COLOR) { getModel().setValueColor(BARGRAPH_COLOR); init(getInnerBounds().width, getInnerBounds().width); repaint(getInnerBounds()); }
[ "public", "void", "setBarGraphColor", "(", "final", "ColorDef", "BARGRAPH_COLOR", ")", "{", "getModel", "(", ")", ".", "setValueColor", "(", "BARGRAPH_COLOR", ")", ";", "init", "(", "getInnerBounds", "(", ")", ".", "width", ",", "getInnerBounds", "(", ")", "...
Sets the current bargraph color to the given enum colordef @param BARGRAPH_COLOR
[ "Sets", "the", "current", "bargraph", "color", "to", "the", "given", "enum", "colordef" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractRadialBargraph.java#L81-L85
3,736
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractRadialBargraph.java
AbstractRadialBargraph.setCustomBarGraphColor
public void setCustomBarGraphColor(final Color COLOR) { getModel().setCustomValueColorObject(new CustomColorDef(COLOR)); init(getInnerBounds().width, getInnerBounds().width); repaint(getInnerBounds()); }
java
public void setCustomBarGraphColor(final Color COLOR) { getModel().setCustomValueColorObject(new CustomColorDef(COLOR)); init(getInnerBounds().width, getInnerBounds().width); repaint(getInnerBounds()); }
[ "public", "void", "setCustomBarGraphColor", "(", "final", "Color", "COLOR", ")", "{", "getModel", "(", ")", ".", "setCustomValueColorObject", "(", "new", "CustomColorDef", "(", "COLOR", ")", ")", ";", "init", "(", "getInnerBounds", "(", ")", ".", "width", ",...
Sets the color that will be used to calculate the custom bargraph color @param COLOR
[ "Sets", "the", "color", "that", "will", "be", "used", "to", "calculate", "the", "custom", "bargraph", "color" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractRadialBargraph.java#L99-L103
3,737
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/tools/GradientWrapper.java
GradientWrapper.getColorAt
public Color getColorAt(final float FRACTION) { float fraction = FRACTION < 0f ? 0f : (FRACTION > 1f ? 1f : FRACTION); float lowerLimit = 0f; int lowerIndex = 0; float upperLimit = 1f; int upperIndex = 1; int index = 0; for (float currentFraction : fractions) { if (Float.compare(currentFraction, fraction) < 0) { lowerLimit = currentFraction; lowerIndex = index; } if (Float.compare(currentFraction, fraction) == 0) { return colors[index]; } if (Float.compare(currentFraction, fraction) > 0) { upperLimit = currentFraction; upperIndex = index; break; } index++; } float interpolationFraction = (fraction - lowerLimit) / (upperLimit - lowerLimit); return interpolateColor(colors[lowerIndex], colors[upperIndex], interpolationFraction); }
java
public Color getColorAt(final float FRACTION) { float fraction = FRACTION < 0f ? 0f : (FRACTION > 1f ? 1f : FRACTION); float lowerLimit = 0f; int lowerIndex = 0; float upperLimit = 1f; int upperIndex = 1; int index = 0; for (float currentFraction : fractions) { if (Float.compare(currentFraction, fraction) < 0) { lowerLimit = currentFraction; lowerIndex = index; } if (Float.compare(currentFraction, fraction) == 0) { return colors[index]; } if (Float.compare(currentFraction, fraction) > 0) { upperLimit = currentFraction; upperIndex = index; break; } index++; } float interpolationFraction = (fraction - lowerLimit) / (upperLimit - lowerLimit); return interpolateColor(colors[lowerIndex], colors[upperIndex], interpolationFraction); }
[ "public", "Color", "getColorAt", "(", "final", "float", "FRACTION", ")", "{", "float", "fraction", "=", "FRACTION", "<", "0f", "?", "0f", ":", "(", "FRACTION", ">", "1f", "?", "1f", ":", "FRACTION", ")", ";", "float", "lowerLimit", "=", "0f", ";", "i...
Returns the color that is defined by the given fraction in the linear gradient paint @param FRACTION @return the color that is defined by the given fraction in the linear gradient paint
[ "Returns", "the", "color", "that", "is", "defined", "by", "the", "given", "fraction", "in", "the", "linear", "gradient", "paint" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/tools/GradientWrapper.java#L109-L136
3,738
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/tools/GradientWrapper.java
GradientWrapper.copyArrays
private void copyArrays(final float[] FRACTIONS, final Color[] colors) { fractions = new float[FRACTIONS.length]; System.arraycopy(FRACTIONS, 0, fractions, 0, FRACTIONS.length); this.colors = colors.clone(); }
java
private void copyArrays(final float[] FRACTIONS, final Color[] colors) { fractions = new float[FRACTIONS.length]; System.arraycopy(FRACTIONS, 0, fractions, 0, FRACTIONS.length); this.colors = colors.clone(); }
[ "private", "void", "copyArrays", "(", "final", "float", "[", "]", "FRACTIONS", ",", "final", "Color", "[", "]", "colors", ")", "{", "fractions", "=", "new", "float", "[", "FRACTIONS", ".", "length", "]", ";", "System", ".", "arraycopy", "(", "FRACTIONS",...
Just create a local copy of the fractions and colors array @param FRACTIONS @param colors
[ "Just", "create", "a", "local", "copy", "of", "the", "fractions", "and", "colors", "array" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/tools/GradientWrapper.java#L161-L165
3,739
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractLinearBargraph.java
AbstractLinearBargraph.create_BARGRAPH_LED_Image
protected BufferedImage create_BARGRAPH_LED_Image(final int WIDTH, final int HEIGHT, final ColorDef COLOR, final Color[] CUSTOM_COLORS) { if (WIDTH <= 20 || HEIGHT <= 20) // 20 is needed otherwise the image size could be smaller than 1 { return UTIL.createImage(1, 1, Transparency.TRANSLUCENT); } final int IMAGE_WIDTH; final int IMAGE_HEIGHT; if (getOrientation() == Orientation.VERTICAL) { // Vertical orientation IMAGE_WIDTH = (int) (WIDTH * 0.1214285714); IMAGE_HEIGHT = (int) (HEIGHT * 0.0121359223); } else { // Horizontal orientation IMAGE_HEIGHT = (int) (WIDTH * 0.0121359223); IMAGE_WIDTH = (int) (HEIGHT * 0.1214285714); } final BufferedImage IMAGE = UTIL.createImage(IMAGE_WIDTH, IMAGE_HEIGHT, Transparency.TRANSLUCENT); final Graphics2D G2 = IMAGE.createGraphics(); G2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); final Rectangle2D LED = new Rectangle2D.Double(0, 0, IMAGE_WIDTH, IMAGE_HEIGHT); final Point2D CENTER = new Point2D.Double(LED.getCenterX(), LED.getCenterY()); final float[] FRACTIONS = { 0.0f, 1.0f }; final Color[] COLORS; if (CUSTOM_COLORS != null && CUSTOM_COLORS.length == 2) { COLORS = CUSTOM_COLORS; } else { COLORS = new Color[]{ COLOR.LIGHT, COLOR.DARK }; } final float RADIUS; switch (getOrientation()) { case VERTICAL: default: RADIUS = (float) (LED.getWidth() / 2f); break; case HORIZONTAL: RADIUS = (float) (LED.getHeight() / 2f); break; } final RadialGradientPaint GRADIENT = new RadialGradientPaint(CENTER, RADIUS, FRACTIONS, COLORS); G2.setPaint(GRADIENT); G2.fill(LED); G2.dispose(); return IMAGE; }
java
protected BufferedImage create_BARGRAPH_LED_Image(final int WIDTH, final int HEIGHT, final ColorDef COLOR, final Color[] CUSTOM_COLORS) { if (WIDTH <= 20 || HEIGHT <= 20) // 20 is needed otherwise the image size could be smaller than 1 { return UTIL.createImage(1, 1, Transparency.TRANSLUCENT); } final int IMAGE_WIDTH; final int IMAGE_HEIGHT; if (getOrientation() == Orientation.VERTICAL) { // Vertical orientation IMAGE_WIDTH = (int) (WIDTH * 0.1214285714); IMAGE_HEIGHT = (int) (HEIGHT * 0.0121359223); } else { // Horizontal orientation IMAGE_HEIGHT = (int) (WIDTH * 0.0121359223); IMAGE_WIDTH = (int) (HEIGHT * 0.1214285714); } final BufferedImage IMAGE = UTIL.createImage(IMAGE_WIDTH, IMAGE_HEIGHT, Transparency.TRANSLUCENT); final Graphics2D G2 = IMAGE.createGraphics(); G2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); final Rectangle2D LED = new Rectangle2D.Double(0, 0, IMAGE_WIDTH, IMAGE_HEIGHT); final Point2D CENTER = new Point2D.Double(LED.getCenterX(), LED.getCenterY()); final float[] FRACTIONS = { 0.0f, 1.0f }; final Color[] COLORS; if (CUSTOM_COLORS != null && CUSTOM_COLORS.length == 2) { COLORS = CUSTOM_COLORS; } else { COLORS = new Color[]{ COLOR.LIGHT, COLOR.DARK }; } final float RADIUS; switch (getOrientation()) { case VERTICAL: default: RADIUS = (float) (LED.getWidth() / 2f); break; case HORIZONTAL: RADIUS = (float) (LED.getHeight() / 2f); break; } final RadialGradientPaint GRADIENT = new RadialGradientPaint(CENTER, RADIUS, FRACTIONS, COLORS); G2.setPaint(GRADIENT); G2.fill(LED); G2.dispose(); return IMAGE; }
[ "protected", "BufferedImage", "create_BARGRAPH_LED_Image", "(", "final", "int", "WIDTH", ",", "final", "int", "HEIGHT", ",", "final", "ColorDef", "COLOR", ",", "final", "Color", "[", "]", "CUSTOM_COLORS", ")", "{", "if", "(", "WIDTH", "<=", "20", "||", "HEIG...
Returns a buffered image of a bargraph led with the given color @param WIDTH @param HEIGHT @param COLOR @param CUSTOM_COLORS @return a buffered image of a bargraph led with the given color
[ "Returns", "a", "buffered", "image", "of", "a", "bargraph", "led", "with", "the", "given", "color" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractLinearBargraph.java#L126-L185
3,740
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/DisplaySingle.java
DisplaySingle.setSectionsVisible
public void setSectionsVisible(final boolean SECTIONS_VISIBLE) { sectionsVisible = SECTIONS_VISIBLE; init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
java
public void setSectionsVisible(final boolean SECTIONS_VISIBLE) { sectionsVisible = SECTIONS_VISIBLE; init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
[ "public", "void", "setSectionsVisible", "(", "final", "boolean", "SECTIONS_VISIBLE", ")", "{", "sectionsVisible", "=", "SECTIONS_VISIBLE", ";", "init", "(", "getInnerBounds", "(", ")", ".", "width", ",", "getInnerBounds", "(", ")", ".", "height", ")", ";", "re...
Sets the visibility of the sections. The sections could be defined by a start value, a stop value and a color. One has to create a Section object from the class Section. The sections are stored in a ArrayList so there could be multiple. This might be a useful feature if you need to have exactly defined areas that you could not visualize with the track feature. @param SECTIONS_VISIBLE
[ "Sets", "the", "visibility", "of", "the", "sections", ".", "The", "sections", "could", "be", "defined", "by", "a", "start", "value", "a", "stop", "value", "and", "a", "color", ".", "One", "has", "to", "create", "a", "Section", "object", "from", "the", ...
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/DisplaySingle.java#L1155-L1159
3,741
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/DisplaySingle.java
DisplaySingle.getSections
public List<Section> getSections() { List<Section> sectionsCopy = new ArrayList<Section>(sections.size()); sectionsCopy.addAll(sections); return sectionsCopy; }
java
public List<Section> getSections() { List<Section> sectionsCopy = new ArrayList<Section>(sections.size()); sectionsCopy.addAll(sections); return sectionsCopy; }
[ "public", "List", "<", "Section", ">", "getSections", "(", ")", "{", "List", "<", "Section", ">", "sectionsCopy", "=", "new", "ArrayList", "<", "Section", ">", "(", "sections", ".", "size", "(", ")", ")", ";", "sectionsCopy", ".", "addAll", "(", "secti...
Returns a copy of the ArrayList that stores the sections. The sections could be defined by a start value, a stop value and a color. One has to create a Section object from the class Section. The sections are stored in a ArrayList so there could be multiple. This might be a useful feature if you need to have exactly defined areas that you could not visualize with the track feature. @return a list of sections
[ "Returns", "a", "copy", "of", "the", "ArrayList", "that", "stores", "the", "sections", ".", "The", "sections", "could", "be", "defined", "by", "a", "start", "value", "a", "stop", "value", "and", "a", "color", ".", "One", "has", "to", "create", "a", "Se...
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/DisplaySingle.java#L1172-L1176
3,742
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/DisplaySingle.java
DisplaySingle.addSection
public void addSection(final Section SECTION) { sections.add(SECTION); init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
java
public void addSection(final Section SECTION) { sections.add(SECTION); init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
[ "public", "void", "addSection", "(", "final", "Section", "SECTION", ")", "{", "sections", ".", "add", "(", "SECTION", ")", ";", "init", "(", "getInnerBounds", "(", ")", ".", "width", ",", "getInnerBounds", "(", ")", ".", "height", ")", ";", "repaint", ...
Adds a given section to the list of sections The sections could be defined by a start value, a stop value and a color. One has to create a Section object from the class Section. The sections are stored in a ArrayList so there could be multiple. This might be a useful feature if you need to have exactly defined areas that you could not visualize with the track feature. @param SECTION
[ "Adds", "a", "given", "section", "to", "the", "list", "of", "sections", "The", "sections", "could", "be", "defined", "by", "a", "start", "value", "a", "stop", "value", "and", "a", "color", ".", "One", "has", "to", "create", "a", "Section", "object", "f...
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/DisplaySingle.java#L1209-L1213
3,743
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/DisplaySingle.java
DisplaySingle.resetSections
public void resetSections() { sections.clear(); init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
java
public void resetSections() { sections.clear(); init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
[ "public", "void", "resetSections", "(", ")", "{", "sections", ".", "clear", "(", ")", ";", "init", "(", "getInnerBounds", "(", ")", ".", "width", ",", "getInnerBounds", "(", ")", ".", "height", ")", ";", "repaint", "(", "getInnerBounds", "(", ")", ")",...
Clear the SECTIONS arraylist
[ "Clear", "the", "SECTIONS", "arraylist" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/DisplaySingle.java#L1218-L1222
3,744
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/extras/Altimeter.java
Altimeter.setValue
@Override public void setValue(final double VALUE) { if (isEnabled()) { this.value100 = (VALUE % 1000) / 100; this.value1000 = (VALUE % 10000) / 100; this.value10000 = (VALUE % 100000) / 100; if (isValueCoupled()) { setLcdValue(VALUE); } fireStateChanged(); this.oldValue = VALUE; repaint(); } }
java
@Override public void setValue(final double VALUE) { if (isEnabled()) { this.value100 = (VALUE % 1000) / 100; this.value1000 = (VALUE % 10000) / 100; this.value10000 = (VALUE % 100000) / 100; if (isValueCoupled()) { setLcdValue(VALUE); } fireStateChanged(); this.oldValue = VALUE; repaint(); } }
[ "@", "Override", "public", "void", "setValue", "(", "final", "double", "VALUE", ")", "{", "if", "(", "isEnabled", "(", ")", ")", "{", "this", ".", "value100", "=", "(", "VALUE", "%", "1000", ")", "/", "100", ";", "this", ".", "value1000", "=", "(",...
Sets the current height in feet @param VALUE
[ "Sets", "the", "current", "height", "in", "feet" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/extras/Altimeter.java#L321-L336
3,745
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/extras/LightBulb.java
LightBulb.setDirection
public void setDirection(final int DIRECTION) { switch (DIRECTION) { case SwingUtilities.SOUTH: direction = SwingUtilities.SOUTH; break; case SwingUtilities.EAST: direction = SwingUtilities.EAST; break; case SwingUtilities.WEST: direction = SwingUtilities.WEST; break; case SwingUtilities.NORTH: default: direction = SwingUtilities.NORTH; break; } repaint(getInnerBounds()); }
java
public void setDirection(final int DIRECTION) { switch (DIRECTION) { case SwingUtilities.SOUTH: direction = SwingUtilities.SOUTH; break; case SwingUtilities.EAST: direction = SwingUtilities.EAST; break; case SwingUtilities.WEST: direction = SwingUtilities.WEST; break; case SwingUtilities.NORTH: default: direction = SwingUtilities.NORTH; break; } repaint(getInnerBounds()); }
[ "public", "void", "setDirection", "(", "final", "int", "DIRECTION", ")", "{", "switch", "(", "DIRECTION", ")", "{", "case", "SwingUtilities", ".", "SOUTH", ":", "direction", "=", "SwingUtilities", ".", "SOUTH", ";", "break", ";", "case", "SwingUtilities", "....
Sets the direction of the lightbulb. Use the constants defined in SwingUtilities SwingUtilities.NORTH SwingUtilities.EAST SwingUtiltites.SOUTH SwingUtilities.WEST @param DIRECTION
[ "Sets", "the", "direction", "of", "the", "lightbulb", ".", "Use", "the", "constants", "defined", "in", "SwingUtilities", "SwingUtilities", ".", "NORTH", "SwingUtilities", ".", "EAST", "SwingUtiltites", ".", "SOUTH", "SwingUtilities", ".", "WEST" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/extras/LightBulb.java#L239-L256
3,746
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/extras/LightBulb.java
LightBulb.createImage
private BufferedImage createImage(final int WIDTH, final int HEIGHT, final int TRANSPARENCY) { final GraphicsConfiguration GFX_CONF = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration(); if (WIDTH <= 0 || HEIGHT <= 0) { return GFX_CONF.createCompatibleImage(1, 1, TRANSPARENCY); } final BufferedImage IMAGE = GFX_CONF.createCompatibleImage(WIDTH, HEIGHT, TRANSPARENCY); return IMAGE; }
java
private BufferedImage createImage(final int WIDTH, final int HEIGHT, final int TRANSPARENCY) { final GraphicsConfiguration GFX_CONF = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration(); if (WIDTH <= 0 || HEIGHT <= 0) { return GFX_CONF.createCompatibleImage(1, 1, TRANSPARENCY); } final BufferedImage IMAGE = GFX_CONF.createCompatibleImage(WIDTH, HEIGHT, TRANSPARENCY); return IMAGE; }
[ "private", "BufferedImage", "createImage", "(", "final", "int", "WIDTH", ",", "final", "int", "HEIGHT", ",", "final", "int", "TRANSPARENCY", ")", "{", "final", "GraphicsConfiguration", "GFX_CONF", "=", "GraphicsEnvironment", ".", "getLocalGraphicsEnvironment", "(", ...
Returns a compatible image of the given size and transparency @param WIDTH @param HEIGHT @param TRANSPARENCY @return a compatible image of the given size and transparency
[ "Returns", "a", "compatible", "image", "of", "the", "given", "size", "and", "transparency" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/extras/LightBulb.java#L497-L504
3,747
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/tools/ConicalGradientPaint.java
ConicalGradientPaint.recalculate
private java.util.HashMap<Float, Color> recalculate(final List<Float> fractionList, final List<Color> colorList, final float OFFSET) { // Recalculate the fractions and colors with the given offset final int MAX_FRACTIONS = fractionList.size(); final HashMap<Float, Color> fractionColors = new HashMap<Float, Color>(MAX_FRACTIONS); for (int i = 0; i < MAX_FRACTIONS; i++) { // Add offset to fraction final float TMP_FRACTION = fractionList.get(i) + OFFSET; // Color related to current fraction final Color TMP_COLOR = colorList.get(i); // Check each fraction for limits (0...1) if (TMP_FRACTION <= 0) { fractionColors.put(1.0f + TMP_FRACTION + 0.0001f, TMP_COLOR); final float NEXT_FRACTION; final Color NEXT_COLOR; if (i < MAX_FRACTIONS - 1) { NEXT_FRACTION = fractionList.get(i + 1) + OFFSET; NEXT_COLOR = colorList.get(i + 1); } else { NEXT_FRACTION = 1 - fractionList.get(0) + OFFSET; NEXT_COLOR = colorList.get(0); } if (NEXT_FRACTION > 0) { final Color NEW_FRACTION_COLOR = getColorFromFraction(TMP_COLOR, NEXT_COLOR, (int) ((NEXT_FRACTION - TMP_FRACTION) * 10000), (int) ((-TMP_FRACTION) * 10000)); fractionColors.put(0.0f, NEW_FRACTION_COLOR); fractionColors.put(1.0f, NEW_FRACTION_COLOR); } } else if (TMP_FRACTION >= 1) { fractionColors.put(TMP_FRACTION - 1.0f - 0.0001f, TMP_COLOR); final float PREVIOUS_FRACTION; final Color PREVIOUS_COLOR; if (i > 0) { PREVIOUS_FRACTION = fractionList.get(i - 1) + OFFSET; PREVIOUS_COLOR = colorList.get(i - 1); } else { PREVIOUS_FRACTION = fractionList.get(MAX_FRACTIONS - 1) + OFFSET; PREVIOUS_COLOR = colorList.get(MAX_FRACTIONS - 1); } if (PREVIOUS_FRACTION < 1) { final Color NEW_FRACTION_COLOR = getColorFromFraction(TMP_COLOR, PREVIOUS_COLOR, (int) ((TMP_FRACTION - PREVIOUS_FRACTION) * 10000), (int) (TMP_FRACTION - 1.0f) * 10000); fractionColors.put(1.0f, NEW_FRACTION_COLOR); fractionColors.put(0.0f, NEW_FRACTION_COLOR); } } else { fractionColors.put(TMP_FRACTION, TMP_COLOR); } } // Clear the original FRACTION_LIST and COLOR_LIST fractionList.clear(); colorList.clear(); return fractionColors; }
java
private java.util.HashMap<Float, Color> recalculate(final List<Float> fractionList, final List<Color> colorList, final float OFFSET) { // Recalculate the fractions and colors with the given offset final int MAX_FRACTIONS = fractionList.size(); final HashMap<Float, Color> fractionColors = new HashMap<Float, Color>(MAX_FRACTIONS); for (int i = 0; i < MAX_FRACTIONS; i++) { // Add offset to fraction final float TMP_FRACTION = fractionList.get(i) + OFFSET; // Color related to current fraction final Color TMP_COLOR = colorList.get(i); // Check each fraction for limits (0...1) if (TMP_FRACTION <= 0) { fractionColors.put(1.0f + TMP_FRACTION + 0.0001f, TMP_COLOR); final float NEXT_FRACTION; final Color NEXT_COLOR; if (i < MAX_FRACTIONS - 1) { NEXT_FRACTION = fractionList.get(i + 1) + OFFSET; NEXT_COLOR = colorList.get(i + 1); } else { NEXT_FRACTION = 1 - fractionList.get(0) + OFFSET; NEXT_COLOR = colorList.get(0); } if (NEXT_FRACTION > 0) { final Color NEW_FRACTION_COLOR = getColorFromFraction(TMP_COLOR, NEXT_COLOR, (int) ((NEXT_FRACTION - TMP_FRACTION) * 10000), (int) ((-TMP_FRACTION) * 10000)); fractionColors.put(0.0f, NEW_FRACTION_COLOR); fractionColors.put(1.0f, NEW_FRACTION_COLOR); } } else if (TMP_FRACTION >= 1) { fractionColors.put(TMP_FRACTION - 1.0f - 0.0001f, TMP_COLOR); final float PREVIOUS_FRACTION; final Color PREVIOUS_COLOR; if (i > 0) { PREVIOUS_FRACTION = fractionList.get(i - 1) + OFFSET; PREVIOUS_COLOR = colorList.get(i - 1); } else { PREVIOUS_FRACTION = fractionList.get(MAX_FRACTIONS - 1) + OFFSET; PREVIOUS_COLOR = colorList.get(MAX_FRACTIONS - 1); } if (PREVIOUS_FRACTION < 1) { final Color NEW_FRACTION_COLOR = getColorFromFraction(TMP_COLOR, PREVIOUS_COLOR, (int) ((TMP_FRACTION - PREVIOUS_FRACTION) * 10000), (int) (TMP_FRACTION - 1.0f) * 10000); fractionColors.put(1.0f, NEW_FRACTION_COLOR); fractionColors.put(0.0f, NEW_FRACTION_COLOR); } } else { fractionColors.put(TMP_FRACTION, TMP_COLOR); } } // Clear the original FRACTION_LIST and COLOR_LIST fractionList.clear(); colorList.clear(); return fractionColors; }
[ "private", "java", ".", "util", ".", "HashMap", "<", "Float", ",", "Color", ">", "recalculate", "(", "final", "List", "<", "Float", ">", "fractionList", ",", "final", "List", "<", "Color", ">", "colorList", ",", "final", "float", "OFFSET", ")", "{", "/...
Recalculates the fractions in the FRACTION_LIST and their associated colors in the COLOR_LIST with a given OFFSET. Because the conical gradients always starts with 0 at the top and clockwise direction you could rotate the defined conical gradient from -180 to 180 degrees which equals values from -0.5 to +0.5 @param fractionList @param colorList @param OFFSET @return Hashmap that contains the recalculated fractions and colors after a given rotation
[ "Recalculates", "the", "fractions", "in", "the", "FRACTION_LIST", "and", "their", "associated", "colors", "in", "the", "COLOR_LIST", "with", "a", "given", "OFFSET", ".", "Because", "the", "conical", "gradients", "always", "starts", "with", "0", "at", "the", "t...
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/tools/ConicalGradientPaint.java#L206-L262
3,748
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractGauge.java
AbstractGauge.setValue
public void setValue(final double VALUE) { if (isEnabled()) { if (!isLogScale()) { model.setValue(VALUE); } else { if (VALUE > 0) { model.setValue(VALUE); } else { model.setValue(1); } } // LED blinking makes only sense when autoResetToZero == OFF if (!isAutoResetToZero()) { // Check if current value exceeds threshold and activate led as indicator if (!model.isThresholdBehaviourInverted()) { if (Double.compare(model.getValue(), model.getThreshold()) >= 0) { if (!LED_BLINKING_TIMER.isRunning()) { LED_BLINKING_TIMER.start(); propertyChangeSupport.firePropertyChange(THRESHOLD_PROPERTY, false, true); } } else { LED_BLINKING_TIMER.stop(); setCurrentLedImage(getLedImageOff()); } } else { if (Double.compare(model.getValue(), model.getThreshold()) <= 0) { if (!LED_BLINKING_TIMER.isRunning()) { LED_BLINKING_TIMER.start(); propertyChangeSupport.firePropertyChange(THRESHOLD_PROPERTY, false, true); } } else { LED_BLINKING_TIMER.stop(); setCurrentLedImage(getLedImageOff()); } } } if (model.getValue() > (model.getOldValue() + model.getRange() * model.getRedrawFactor()) || model.getValue() < (model.getOldValue() - model.getRange() * model.getRedrawFactor())) { repaint(getInnerBounds()); } fireStateChanged(); propertyChangeSupport.firePropertyChange(VALUE_PROPERTY, model.getOldValue(), model.getValue()); } }
java
public void setValue(final double VALUE) { if (isEnabled()) { if (!isLogScale()) { model.setValue(VALUE); } else { if (VALUE > 0) { model.setValue(VALUE); } else { model.setValue(1); } } // LED blinking makes only sense when autoResetToZero == OFF if (!isAutoResetToZero()) { // Check if current value exceeds threshold and activate led as indicator if (!model.isThresholdBehaviourInverted()) { if (Double.compare(model.getValue(), model.getThreshold()) >= 0) { if (!LED_BLINKING_TIMER.isRunning()) { LED_BLINKING_TIMER.start(); propertyChangeSupport.firePropertyChange(THRESHOLD_PROPERTY, false, true); } } else { LED_BLINKING_TIMER.stop(); setCurrentLedImage(getLedImageOff()); } } else { if (Double.compare(model.getValue(), model.getThreshold()) <= 0) { if (!LED_BLINKING_TIMER.isRunning()) { LED_BLINKING_TIMER.start(); propertyChangeSupport.firePropertyChange(THRESHOLD_PROPERTY, false, true); } } else { LED_BLINKING_TIMER.stop(); setCurrentLedImage(getLedImageOff()); } } } if (model.getValue() > (model.getOldValue() + model.getRange() * model.getRedrawFactor()) || model.getValue() < (model.getOldValue() - model.getRange() * model.getRedrawFactor())) { repaint(getInnerBounds()); } fireStateChanged(); propertyChangeSupport.firePropertyChange(VALUE_PROPERTY, model.getOldValue(), model.getValue()); } }
[ "public", "void", "setValue", "(", "final", "double", "VALUE", ")", "{", "if", "(", "isEnabled", "(", ")", ")", "{", "if", "(", "!", "isLogScale", "(", ")", ")", "{", "model", ".", "setValue", "(", "VALUE", ")", ";", "}", "else", "{", "if", "(", ...
Sets the value of the gauge. This method is primarly used for static gauges or if you really have measurement results that are occuring within the range of a second. If you have slow changing values you should better use the method setValueAnimated. @param VALUE
[ "Sets", "the", "value", "of", "the", "gauge", ".", "This", "method", "is", "primarly", "used", "for", "static", "gauges", "or", "if", "you", "really", "have", "measurement", "results", "that", "are", "occuring", "within", "the", "range", "of", "a", "second...
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractGauge.java#L255-L301
3,749
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractGauge.java
AbstractGauge.setLedColor
public void setLedColor(final LedColor LED_COLOR) { model.setLedColor(LED_COLOR); final boolean LED_WAS_ON = currentLedImage.equals(ledImageOn) ? true : false; switch (getOrientation()) { case HORIZONTAL: recreateLedImages(getHeight()); break; case VERTICAL: recreateLedImages(getWidth()); break; default: recreateLedImages(); break; } if (currentLedImage != null) { currentLedImage.flush(); } currentLedImage = LED_WAS_ON == true ? ledImageOn : ledImageOff; repaint(getInnerBounds()); }
java
public void setLedColor(final LedColor LED_COLOR) { model.setLedColor(LED_COLOR); final boolean LED_WAS_ON = currentLedImage.equals(ledImageOn) ? true : false; switch (getOrientation()) { case HORIZONTAL: recreateLedImages(getHeight()); break; case VERTICAL: recreateLedImages(getWidth()); break; default: recreateLedImages(); break; } if (currentLedImage != null) { currentLedImage.flush(); } currentLedImage = LED_WAS_ON == true ? ledImageOn : ledImageOff; repaint(getInnerBounds()); }
[ "public", "void", "setLedColor", "(", "final", "LedColor", "LED_COLOR", ")", "{", "model", ".", "setLedColor", "(", "LED_COLOR", ")", ";", "final", "boolean", "LED_WAS_ON", "=", "currentLedImage", ".", "equals", "(", "ledImageOn", ")", "?", "true", ":", "fal...
Sets the color of the threshold led dependend on the orientation of a component. This is only important for the linear gauges where the width and the height are different. The LedColor is not a standard color but defines a color scheme for the led. The default ledcolor is RED @param LED_COLOR
[ "Sets", "the", "color", "of", "the", "threshold", "led", "dependend", "on", "the", "orientation", "of", "a", "component", ".", "This", "is", "only", "important", "for", "the", "linear", "gauges", "where", "the", "width", "and", "the", "height", "are", "dif...
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractGauge.java#L660-L681
3,750
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractGauge.java
AbstractGauge.setCustomLedColor
public void setCustomLedColor(final Color COLOR) { model.setCustomLedColor(new CustomLedColor(COLOR)); final boolean LED_WAS_ON = currentLedImage.equals(ledImageOn) ? true : false; switch (getOrientation()) { case HORIZONTAL: recreateLedImages(getHeight()); break; case VERTICAL: recreateLedImages(getWidth()); break; default: recreateLedImages(); break; } if (currentLedImage != null) { currentLedImage.flush(); } currentLedImage = LED_WAS_ON == true ? ledImageOn : ledImageOff; repaint(getInnerBounds()); }
java
public void setCustomLedColor(final Color COLOR) { model.setCustomLedColor(new CustomLedColor(COLOR)); final boolean LED_WAS_ON = currentLedImage.equals(ledImageOn) ? true : false; switch (getOrientation()) { case HORIZONTAL: recreateLedImages(getHeight()); break; case VERTICAL: recreateLedImages(getWidth()); break; default: recreateLedImages(); break; } if (currentLedImage != null) { currentLedImage.flush(); } currentLedImage = LED_WAS_ON == true ? ledImageOn : ledImageOff; repaint(getInnerBounds()); }
[ "public", "void", "setCustomLedColor", "(", "final", "Color", "COLOR", ")", "{", "model", ".", "setCustomLedColor", "(", "new", "CustomLedColor", "(", "COLOR", ")", ")", ";", "final", "boolean", "LED_WAS_ON", "=", "currentLedImage", ".", "equals", "(", "ledIma...
Sets the color from which the custom ledcolor will be calculated @param COLOR
[ "Sets", "the", "color", "from", "which", "the", "custom", "ledcolor", "will", "be", "calculated" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractGauge.java#L695-L717
3,751
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractGauge.java
AbstractGauge.setLedBlinking
public void setLedBlinking(final boolean LED_BLINKING) { ledBlinking = LED_BLINKING; if (LED_BLINKING) { LED_BLINKING_TIMER.start(); } else { setCurrentLedImage(getLedImageOff()); LED_BLINKING_TIMER.stop(); } }
java
public void setLedBlinking(final boolean LED_BLINKING) { ledBlinking = LED_BLINKING; if (LED_BLINKING) { LED_BLINKING_TIMER.start(); } else { setCurrentLedImage(getLedImageOff()); LED_BLINKING_TIMER.stop(); } }
[ "public", "void", "setLedBlinking", "(", "final", "boolean", "LED_BLINKING", ")", "{", "ledBlinking", "=", "LED_BLINKING", ";", "if", "(", "LED_BLINKING", ")", "{", "LED_BLINKING_TIMER", ".", "start", "(", ")", ";", "}", "else", "{", "setCurrentLedImage", "(",...
Sets the state of the threshold led. The led could blink which will be triggered by a javax.swing.Timer that triggers every 500 ms. The blinking will be done by switching between two images. @param LED_BLINKING
[ "Sets", "the", "state", "of", "the", "threshold", "led", ".", "The", "led", "could", "blink", "which", "will", "be", "triggered", "by", "a", "javax", ".", "swing", ".", "Timer", "that", "triggers", "every", "500", "ms", ".", "The", "blinking", "will", ...
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractGauge.java#L737-L745
3,752
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractGauge.java
AbstractGauge.recreateLedImages
protected void recreateLedImages(final int SIZE) { if (ledImageOff != null) { ledImageOff.flush(); } ledImageOff = create_LED_Image(SIZE, 0, model.getLedColor()); if (ledImageOn != null) { ledImageOn.flush(); } ledImageOn = create_LED_Image(SIZE, 1, model.getLedColor()); }
java
protected void recreateLedImages(final int SIZE) { if (ledImageOff != null) { ledImageOff.flush(); } ledImageOff = create_LED_Image(SIZE, 0, model.getLedColor()); if (ledImageOn != null) { ledImageOn.flush(); } ledImageOn = create_LED_Image(SIZE, 1, model.getLedColor()); }
[ "protected", "void", "recreateLedImages", "(", "final", "int", "SIZE", ")", "{", "if", "(", "ledImageOff", "!=", "null", ")", "{", "ledImageOff", ".", "flush", "(", ")", ";", "}", "ledImageOff", "=", "create_LED_Image", "(", "SIZE", ",", "0", ",", "model...
Recreates the current threshold led images due to the given width @param SIZE
[ "Recreates", "the", "current", "threshold", "led", "images", "due", "to", "the", "given", "width" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractGauge.java#L778-L788
3,753
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractGauge.java
AbstractGauge.setCurrentLedImage
protected void setCurrentLedImage(final BufferedImage CURRENT_LED_IMAGE) { if (currentLedImage != null) { currentLedImage.flush(); } currentLedImage = CURRENT_LED_IMAGE; repaint(getInnerBounds()); }
java
protected void setCurrentLedImage(final BufferedImage CURRENT_LED_IMAGE) { if (currentLedImage != null) { currentLedImage.flush(); } currentLedImage = CURRENT_LED_IMAGE; repaint(getInnerBounds()); }
[ "protected", "void", "setCurrentLedImage", "(", "final", "BufferedImage", "CURRENT_LED_IMAGE", ")", "{", "if", "(", "currentLedImage", "!=", "null", ")", "{", "currentLedImage", ".", "flush", "(", ")", ";", "}", "currentLedImage", "=", "CURRENT_LED_IMAGE", ";", ...
Sets the image of the currently used led image. @param CURRENT_LED_IMAGE
[ "Sets", "the", "image", "of", "the", "currently", "used", "led", "image", "." ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractGauge.java#L802-L808
3,754
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractGauge.java
AbstractGauge.setUserLedColor
public void setUserLedColor(final LedColor LED_COLOR) { model.setUserLedColor(LED_COLOR); final boolean LED_WAS_ON = currentUserLedImage.equals(userLedImageOn) ? true : false; switch (getOrientation()) { case HORIZONTAL: recreateUserLedImages(getHeight()); break; case VERTICAL: recreateUserLedImages(getWidth()); break; default: recreateUserLedImages(); break; } if (currentUserLedImage != null) { currentUserLedImage.flush(); } currentUserLedImage = LED_WAS_ON == true ? userLedImageOn : userLedImageOff; repaint(getInnerBounds()); }
java
public void setUserLedColor(final LedColor LED_COLOR) { model.setUserLedColor(LED_COLOR); final boolean LED_WAS_ON = currentUserLedImage.equals(userLedImageOn) ? true : false; switch (getOrientation()) { case HORIZONTAL: recreateUserLedImages(getHeight()); break; case VERTICAL: recreateUserLedImages(getWidth()); break; default: recreateUserLedImages(); break; } if (currentUserLedImage != null) { currentUserLedImage.flush(); } currentUserLedImage = LED_WAS_ON == true ? userLedImageOn : userLedImageOff; repaint(getInnerBounds()); }
[ "public", "void", "setUserLedColor", "(", "final", "LedColor", "LED_COLOR", ")", "{", "model", ".", "setUserLedColor", "(", "LED_COLOR", ")", ";", "final", "boolean", "LED_WAS_ON", "=", "currentUserLedImage", ".", "equals", "(", "userLedImageOn", ")", "?", "true...
Sets the color of the user led dependend on the orientation of a component. This is only important for the linear gauges where the width and the height are different. The LedColor is not a standard color but defines a color scheme for the led. The default ledcolor is RED @param LED_COLOR
[ "Sets", "the", "color", "of", "the", "user", "led", "dependend", "on", "the", "orientation", "of", "a", "component", ".", "This", "is", "only", "important", "for", "the", "linear", "gauges", "where", "the", "width", "and", "the", "height", "are", "differen...
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractGauge.java#L836-L857
3,755
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractGauge.java
AbstractGauge.setCustomUserLedColor
public void setCustomUserLedColor(final Color COLOR) { model.setCustomUserLedColor(new CustomLedColor(COLOR)); final boolean LED_WAS_ON = currentUserLedImage.equals(ledImageOn) ? true : false; switch (getOrientation()) { case HORIZONTAL: recreateUserLedImages(getHeight()); break; case VERTICAL: recreateUserLedImages(getWidth()); break; default: recreateUserLedImages(); break; } if (currentUserLedImage != null) { currentUserLedImage.flush(); } currentUserLedImage = LED_WAS_ON == true ? userLedImageOn : userLedImageOff; repaint(getInnerBounds()); }
java
public void setCustomUserLedColor(final Color COLOR) { model.setCustomUserLedColor(new CustomLedColor(COLOR)); final boolean LED_WAS_ON = currentUserLedImage.equals(ledImageOn) ? true : false; switch (getOrientation()) { case HORIZONTAL: recreateUserLedImages(getHeight()); break; case VERTICAL: recreateUserLedImages(getWidth()); break; default: recreateUserLedImages(); break; } if (currentUserLedImage != null) { currentUserLedImage.flush(); } currentUserLedImage = LED_WAS_ON == true ? userLedImageOn : userLedImageOff; repaint(getInnerBounds()); }
[ "public", "void", "setCustomUserLedColor", "(", "final", "Color", "COLOR", ")", "{", "model", ".", "setCustomUserLedColor", "(", "new", "CustomLedColor", "(", "COLOR", ")", ")", ";", "final", "boolean", "LED_WAS_ON", "=", "currentUserLedImage", ".", "equals", "(...
Sets the color from which the custom user ledcolor will be calculated @param COLOR
[ "Sets", "the", "color", "from", "which", "the", "custom", "user", "ledcolor", "will", "be", "calculated" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractGauge.java#L871-L893
3,756
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractGauge.java
AbstractGauge.setUserLedBlinking
public void setUserLedBlinking(final boolean USER_LED_BLINKING) { this.userLedBlinking = USER_LED_BLINKING; if (USER_LED_BLINKING) { USER_LED_BLINKING_TIMER.start(); } else { setCurrentUserLedImage(getUserLedImageOff()); USER_LED_BLINKING_TIMER.stop(); } }
java
public void setUserLedBlinking(final boolean USER_LED_BLINKING) { this.userLedBlinking = USER_LED_BLINKING; if (USER_LED_BLINKING) { USER_LED_BLINKING_TIMER.start(); } else { setCurrentUserLedImage(getUserLedImageOff()); USER_LED_BLINKING_TIMER.stop(); } }
[ "public", "void", "setUserLedBlinking", "(", "final", "boolean", "USER_LED_BLINKING", ")", "{", "this", ".", "userLedBlinking", "=", "USER_LED_BLINKING", ";", "if", "(", "USER_LED_BLINKING", ")", "{", "USER_LED_BLINKING_TIMER", ".", "start", "(", ")", ";", "}", ...
Sets the state of the user led. The led could blink which will be triggered by a javax.swing.Timer that triggers every 500 ms. The blinking will be done by switching between two images. @param USER_LED_BLINKING
[ "Sets", "the", "state", "of", "the", "user", "led", ".", "The", "led", "could", "blink", "which", "will", "be", "triggered", "by", "a", "javax", ".", "swing", ".", "Timer", "that", "triggers", "every", "500", "ms", ".", "The", "blinking", "will", "be",...
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractGauge.java#L913-L921
3,757
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractGauge.java
AbstractGauge.recreateUserLedImages
protected void recreateUserLedImages(final int SIZE) { if (userLedImageOff != null) { userLedImageOff.flush(); } userLedImageOff = create_LED_Image(SIZE, 0, model.getUserLedColor()); if (userLedImageOn != null) { userLedImageOn.flush(); } userLedImageOn = create_LED_Image(SIZE, 1, model.getUserLedColor()); }
java
protected void recreateUserLedImages(final int SIZE) { if (userLedImageOff != null) { userLedImageOff.flush(); } userLedImageOff = create_LED_Image(SIZE, 0, model.getUserLedColor()); if (userLedImageOn != null) { userLedImageOn.flush(); } userLedImageOn = create_LED_Image(SIZE, 1, model.getUserLedColor()); }
[ "protected", "void", "recreateUserLedImages", "(", "final", "int", "SIZE", ")", "{", "if", "(", "userLedImageOff", "!=", "null", ")", "{", "userLedImageOff", ".", "flush", "(", ")", ";", "}", "userLedImageOff", "=", "create_LED_Image", "(", "SIZE", ",", "0",...
Recreates the current user led images due to the given width @param SIZE
[ "Recreates", "the", "current", "user", "led", "images", "due", "to", "the", "given", "width" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractGauge.java#L954-L964
3,758
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractGauge.java
AbstractGauge.setCurrentUserLedImage
protected void setCurrentUserLedImage(final BufferedImage CURRENT_USER_LED_IMAGE) { if (currentUserLedImage != null) { currentUserLedImage.flush(); } currentUserLedImage = CURRENT_USER_LED_IMAGE; repaint(getInnerBounds()); }
java
protected void setCurrentUserLedImage(final BufferedImage CURRENT_USER_LED_IMAGE) { if (currentUserLedImage != null) { currentUserLedImage.flush(); } currentUserLedImage = CURRENT_USER_LED_IMAGE; repaint(getInnerBounds()); }
[ "protected", "void", "setCurrentUserLedImage", "(", "final", "BufferedImage", "CURRENT_USER_LED_IMAGE", ")", "{", "if", "(", "currentUserLedImage", "!=", "null", ")", "{", "currentUserLedImage", ".", "flush", "(", ")", ";", "}", "currentUserLedImage", "=", "CURRENT_...
Sets the image of the currently used user led image. @param CURRENT_USER_LED_IMAGE
[ "Sets", "the", "image", "of", "the", "currently", "used", "user", "led", "image", "." ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractGauge.java#L978-L984
3,759
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractGauge.java
AbstractGauge.setTextureColor
public void setTextureColor(final Color TEXTURE_COLOR) { model.setTextureColor(TEXTURE_COLOR); BACKGROUND_FACTORY.recreatePunchedSheetTexture(TEXTURE_COLOR); reInitialize(); }
java
public void setTextureColor(final Color TEXTURE_COLOR) { model.setTextureColor(TEXTURE_COLOR); BACKGROUND_FACTORY.recreatePunchedSheetTexture(TEXTURE_COLOR); reInitialize(); }
[ "public", "void", "setTextureColor", "(", "final", "Color", "TEXTURE_COLOR", ")", "{", "model", ".", "setTextureColor", "(", "TEXTURE_COLOR", ")", ";", "BACKGROUND_FACTORY", ".", "recreatePunchedSheetTexture", "(", "TEXTURE_COLOR", ")", ";", "reInitialize", "(", ")"...
Sets the color that will be used to render textures like Carbon, PunchedSheet, Linen etc. @param TEXTURE_COLOR
[ "Sets", "the", "color", "that", "will", "be", "used", "to", "render", "textures", "like", "Carbon", "PunchedSheet", "Linen", "etc", "." ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractGauge.java#L2453-L2457
3,760
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractGauge.java
AbstractGauge.setCustomBackground
public void setCustomBackground(final Paint CUSTOM_BACKGROUND) { model.setCustomBackground(CUSTOM_BACKGROUND); if (model.getBackgroundColor() == BackgroundColor.CUSTOM) { reInitialize(); } }
java
public void setCustomBackground(final Paint CUSTOM_BACKGROUND) { model.setCustomBackground(CUSTOM_BACKGROUND); if (model.getBackgroundColor() == BackgroundColor.CUSTOM) { reInitialize(); } }
[ "public", "void", "setCustomBackground", "(", "final", "Paint", "CUSTOM_BACKGROUND", ")", "{", "model", ".", "setCustomBackground", "(", "CUSTOM_BACKGROUND", ")", ";", "if", "(", "model", ".", "getBackgroundColor", "(", ")", "==", "BackgroundColor", ".", "CUSTOM",...
Sets the custom background paint that will be used instead of the predefined backgroundcolors like DARK_GRAY, BEIGE etc. @param CUSTOM_BACKGROUND
[ "Sets", "the", "custom", "background", "paint", "that", "will", "be", "used", "instead", "of", "the", "predefined", "backgroundcolors", "like", "DARK_GRAY", "BEIGE", "etc", "." ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractGauge.java#L2475-L2480
3,761
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractGauge.java
AbstractGauge.create_LED_Image
protected final BufferedImage create_LED_Image(final int SIZE, final int STATE, final LedColor LED_COLOR) { return LED_FACTORY.create_LED_Image(SIZE, STATE, LED_COLOR, model.getCustomLedColor()); }
java
protected final BufferedImage create_LED_Image(final int SIZE, final int STATE, final LedColor LED_COLOR) { return LED_FACTORY.create_LED_Image(SIZE, STATE, LED_COLOR, model.getCustomLedColor()); }
[ "protected", "final", "BufferedImage", "create_LED_Image", "(", "final", "int", "SIZE", ",", "final", "int", "STATE", ",", "final", "LedColor", "LED_COLOR", ")", "{", "return", "LED_FACTORY", ".", "create_LED_Image", "(", "SIZE", ",", "STATE", ",", "LED_COLOR", ...
Returns an image of a led with the given size, state and color. If the LED_COLOR parameter equals CUSTOM the userLedColor will be used to calculate the custom led colors @param SIZE @param STATE @param LED_COLOR @return the led image
[ "Returns", "an", "image", "of", "a", "led", "with", "the", "given", "size", "state", "and", "color", ".", "If", "the", "LED_COLOR", "parameter", "equals", "CUSTOM", "the", "userLedColor", "will", "be", "used", "to", "calculate", "the", "custom", "led", "co...
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractGauge.java#L2609-L2611
3,762
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/extras/StopWatch.java
StopWatch.setRunning
public void setRunning(final boolean RUNNING) { running = RUNNING; if (RUNNING) { if (!CLOCK_TIMER.isRunning()) { CLOCK_TIMER.start(); start = System.currentTimeMillis(); repaint(INNER_BOUNDS); } } else { if (CLOCK_TIMER.isRunning()) { CLOCK_TIMER.stop(); } } }
java
public void setRunning(final boolean RUNNING) { running = RUNNING; if (RUNNING) { if (!CLOCK_TIMER.isRunning()) { CLOCK_TIMER.start(); start = System.currentTimeMillis(); repaint(INNER_BOUNDS); } } else { if (CLOCK_TIMER.isRunning()) { CLOCK_TIMER.stop(); } } }
[ "public", "void", "setRunning", "(", "final", "boolean", "RUNNING", ")", "{", "running", "=", "RUNNING", ";", "if", "(", "RUNNING", ")", "{", "if", "(", "!", "CLOCK_TIMER", ".", "isRunning", "(", ")", ")", "{", "CLOCK_TIMER", ".", "start", "(", ")", ...
Start or stop the stopwatch @param RUNNING
[ "Start", "or", "stop", "the", "stopwatch" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/extras/StopWatch.java#L279-L292
3,763
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/extras/TrafficLight2.java
TrafficLight2.calcInnerBounds
private void calcInnerBounds() { final Insets INSETS = getInsets(); if (yellowVisible) { final int PREF_HEIGHT = getWidth() < (int) (getHeight() * 0.4) ? (int) (getWidth() * 2.5) : getHeight(); INNER_BOUNDS.setBounds(INSETS.left, INSETS.top, (int) (PREF_HEIGHT * 0.4) - INSETS.left - INSETS.right, PREF_HEIGHT - INSETS.top - INSETS.bottom); } else { final int PREF_HEIGHT = getWidth() < (int) (getHeight() * 0.5714285714) ? (int) (getWidth() * 1.75) : getHeight(); INNER_BOUNDS.setBounds(INSETS.left, INSETS.top, (int) (PREF_HEIGHT * 0.5714285714) - INSETS.left - INSETS.right, PREF_HEIGHT - INSETS.top - INSETS.bottom); } }
java
private void calcInnerBounds() { final Insets INSETS = getInsets(); if (yellowVisible) { final int PREF_HEIGHT = getWidth() < (int) (getHeight() * 0.4) ? (int) (getWidth() * 2.5) : getHeight(); INNER_BOUNDS.setBounds(INSETS.left, INSETS.top, (int) (PREF_HEIGHT * 0.4) - INSETS.left - INSETS.right, PREF_HEIGHT - INSETS.top - INSETS.bottom); } else { final int PREF_HEIGHT = getWidth() < (int) (getHeight() * 0.5714285714) ? (int) (getWidth() * 1.75) : getHeight(); INNER_BOUNDS.setBounds(INSETS.left, INSETS.top, (int) (PREF_HEIGHT * 0.5714285714) - INSETS.left - INSETS.right, PREF_HEIGHT - INSETS.top - INSETS.bottom); } }
[ "private", "void", "calcInnerBounds", "(", ")", "{", "final", "Insets", "INSETS", "=", "getInsets", "(", ")", ";", "if", "(", "yellowVisible", ")", "{", "final", "int", "PREF_HEIGHT", "=", "getWidth", "(", ")", "<", "(", "int", ")", "(", "getHeight", "...
Calculates the area that is available for painting the display
[ "Calculates", "the", "area", "that", "is", "available", "for", "painting", "the", "display" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/extras/TrafficLight2.java#L400-L409
3,764
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/extras/Led.java
Led.setLedType
public void setLedType(final LedType LED_TYPE) { if (ledType == LED_TYPE) {return;} ledType = LED_TYPE; final boolean LED_WAS_ON = currentLedImage.equals(ledImageOn) ? true : false; flushImages(); ledImageOff = create_LED_Image(getWidth(), 0, ledColor, ledType); ledImageOn = create_LED_Image(getWidth(), 1, ledColor, ledType); currentLedImage = LED_WAS_ON == true ? ledImageOn : ledImageOff; repaint(); }
java
public void setLedType(final LedType LED_TYPE) { if (ledType == LED_TYPE) {return;} ledType = LED_TYPE; final boolean LED_WAS_ON = currentLedImage.equals(ledImageOn) ? true : false; flushImages(); ledImageOff = create_LED_Image(getWidth(), 0, ledColor, ledType); ledImageOn = create_LED_Image(getWidth(), 1, ledColor, ledType); currentLedImage = LED_WAS_ON == true ? ledImageOn : ledImageOff; repaint(); }
[ "public", "void", "setLedType", "(", "final", "LedType", "LED_TYPE", ")", "{", "if", "(", "ledType", "==", "LED_TYPE", ")", "{", "return", ";", "}", "ledType", "=", "LED_TYPE", ";", "final", "boolean", "LED_WAS_ON", "=", "currentLedImage", ".", "equals", "...
Sets the type of LED. @param LED_TYPE Possible values are ROUND, RECT_VERTICAL and RECT_HORIZONTAL
[ "Sets", "the", "type", "of", "LED", "." ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/extras/Led.java#L196-L208
3,765
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/extras/Led.java
Led.setLedColor
public void setLedColor(final LedColor LED_COLOR) { if (ledColor == LED_COLOR) {return;} if (LED_COLOR == null) { ledColor = LedColor.RED_LED; } else { ledColor = LED_COLOR; } final boolean LED_WAS_ON = currentLedImage.equals(ledImageOn) ? true : false; flushImages(); ledImageOff = create_LED_Image(getWidth(), 0, LED_COLOR, ledType); ledImageOn = create_LED_Image(getWidth(), 1, LED_COLOR, ledType); currentLedImage = LED_WAS_ON == true ? ledImageOn : ledImageOff; repaint(); }
java
public void setLedColor(final LedColor LED_COLOR) { if (ledColor == LED_COLOR) {return;} if (LED_COLOR == null) { ledColor = LedColor.RED_LED; } else { ledColor = LED_COLOR; } final boolean LED_WAS_ON = currentLedImage.equals(ledImageOn) ? true : false; flushImages(); ledImageOff = create_LED_Image(getWidth(), 0, LED_COLOR, ledType); ledImageOn = create_LED_Image(getWidth(), 1, LED_COLOR, ledType); currentLedImage = LED_WAS_ON == true ? ledImageOn : ledImageOff; repaint(); }
[ "public", "void", "setLedColor", "(", "final", "LedColor", "LED_COLOR", ")", "{", "if", "(", "ledColor", "==", "LED_COLOR", ")", "{", "return", ";", "}", "if", "(", "LED_COLOR", "==", "null", ")", "{", "ledColor", "=", "LedColor", ".", "RED_LED", ";", ...
Sets the color of the threshold led. The LedColor is not a standard color but defines a color scheme for the led. The default ledcolor is RED @param LED_COLOR
[ "Sets", "the", "color", "of", "the", "threshold", "led", ".", "The", "LedColor", "is", "not", "a", "standard", "color", "but", "defines", "a", "color", "scheme", "for", "the", "led", ".", "The", "default", "ledcolor", "is", "RED" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/extras/Led.java#L226-L242
3,766
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/extras/Led.java
Led.setCustomLedColor
public void setCustomLedColor(final Color COLOR) { if (customLedColor.COLOR.equals(COLOR)) {return;} customLedColor = new CustomLedColor(COLOR); final boolean LED_WAS_ON = currentLedImage.equals(ledImageOn) ? true : false; flushImages(); ledImageOff = create_LED_Image(getWidth(), 0, ledColor, ledType); ledImageOn = create_LED_Image(getWidth(), 1, ledColor, ledType); currentLedImage = LED_WAS_ON == true ? ledImageOn : ledImageOff; repaint(); }
java
public void setCustomLedColor(final Color COLOR) { if (customLedColor.COLOR.equals(COLOR)) {return;} customLedColor = new CustomLedColor(COLOR); final boolean LED_WAS_ON = currentLedImage.equals(ledImageOn) ? true : false; flushImages(); ledImageOff = create_LED_Image(getWidth(), 0, ledColor, ledType); ledImageOn = create_LED_Image(getWidth(), 1, ledColor, ledType); currentLedImage = LED_WAS_ON == true ? ledImageOn : ledImageOff; repaint(); }
[ "public", "void", "setCustomLedColor", "(", "final", "Color", "COLOR", ")", "{", "if", "(", "customLedColor", ".", "COLOR", ".", "equals", "(", "COLOR", ")", ")", "{", "return", ";", "}", "customLedColor", "=", "new", "CustomLedColor", "(", "COLOR", ")", ...
Sets the color that will be used to calculate the custom led color @param COLOR
[ "Sets", "the", "color", "that", "will", "be", "used", "to", "calculate", "the", "custom", "led", "color" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/extras/Led.java#L256-L269
3,767
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/tools/Histogram.java
Histogram.addDataPoint
public void addDataPoint(final int INDEX) { FREQUENCE[INDEX > n - 1 ? n - 1 : INDEX]++; max = FREQUENCE[INDEX] > max ? FREQUENCE[INDEX] : max; }
java
public void addDataPoint(final int INDEX) { FREQUENCE[INDEX > n - 1 ? n - 1 : INDEX]++; max = FREQUENCE[INDEX] > max ? FREQUENCE[INDEX] : max; }
[ "public", "void", "addDataPoint", "(", "final", "int", "INDEX", ")", "{", "FREQUENCE", "[", "INDEX", ">", "n", "-", "1", "?", "n", "-", "1", ":", "INDEX", "]", "++", ";", "max", "=", "FREQUENCE", "[", "INDEX", "]", ">", "max", "?", "FREQUENCE", "...
Add one occurrence of the value i.
[ "Add", "one", "occurrence", "of", "the", "value", "i", "." ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/tools/Histogram.java#L54-L57
3,768
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java
AbstractRadial.setFrameType
public void setFrameType(final FrameType FRAME_TYPE) { getModel().setFrameType(FRAME_TYPE); init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
java
public void setFrameType(final FrameType FRAME_TYPE) { getModel().setFrameType(FRAME_TYPE); init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
[ "public", "void", "setFrameType", "(", "final", "FrameType", "FRAME_TYPE", ")", "{", "getModel", "(", ")", ".", "setFrameType", "(", "FRAME_TYPE", ")", ";", "init", "(", "getInnerBounds", "(", ")", ".", "width", ",", "getInnerBounds", "(", ")", ".", "heigh...
Defines the type of frame that will be used for the radial gauge. It could be round our square. @param FRAME_TYPE
[ "Defines", "the", "type", "of", "frame", "that", "will", "be", "used", "for", "the", "radial", "gauge", ".", "It", "could", "be", "round", "our", "square", "." ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java#L218-L222
3,769
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java
AbstractRadial.setForegroundType
public void setForegroundType(final ForegroundType FOREGROUND_TYPE) { getModel().setForegroundType(FOREGROUND_TYPE); init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
java
public void setForegroundType(final ForegroundType FOREGROUND_TYPE) { getModel().setForegroundType(FOREGROUND_TYPE); init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
[ "public", "void", "setForegroundType", "(", "final", "ForegroundType", "FOREGROUND_TYPE", ")", "{", "getModel", "(", ")", ".", "setForegroundType", "(", "FOREGROUND_TYPE", ")", ";", "init", "(", "getInnerBounds", "(", ")", ".", "width", ",", "getInnerBounds", "(...
Defines the type of foreground that will be used for the radial gauge. There area three types available. @param FOREGROUND_TYPE
[ "Defines", "the", "type", "of", "foreground", "that", "will", "be", "used", "for", "the", "radial", "gauge", ".", "There", "area", "three", "types", "available", "." ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java#L238-L242
3,770
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java
AbstractRadial.setLedPosition
@Override public void setLedPosition(final double X, final double Y) { ledPosition.setLocation(X, Y); repaint(getInnerBounds()); }
java
@Override public void setLedPosition(final double X, final double Y) { ledPosition.setLocation(X, Y); repaint(getInnerBounds()); }
[ "@", "Override", "public", "void", "setLedPosition", "(", "final", "double", "X", ",", "final", "double", "Y", ")", "{", "ledPosition", ".", "setLocation", "(", "X", ",", "Y", ")", ";", "repaint", "(", "getInnerBounds", "(", ")", ")", ";", "}" ]
Sets the position of the gauge threshold led to the given values @param X @param Y
[ "Sets", "the", "position", "of", "the", "gauge", "threshold", "led", "to", "the", "given", "values" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java#L432-L436
3,771
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java
AbstractRadial.setUserLedPosition
@Override public void setUserLedPosition(final double X, final double Y) { userLedPosition.setLocation(X, Y); repaint(getInnerBounds()); }
java
@Override public void setUserLedPosition(final double X, final double Y) { userLedPosition.setLocation(X, Y); repaint(getInnerBounds()); }
[ "@", "Override", "public", "void", "setUserLedPosition", "(", "final", "double", "X", ",", "final", "double", "Y", ")", "{", "userLedPosition", ".", "setLocation", "(", "X", ",", "Y", ")", ";", "repaint", "(", "getInnerBounds", "(", ")", ")", ";", "}" ]
Sets the position of the gauge user led to the given values @param X @param Y
[ "Sets", "the", "position", "of", "the", "gauge", "user", "led", "to", "the", "given", "values" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java#L461-L465
3,772
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java
AbstractRadial.setTickmarkDirection
public void setTickmarkDirection(final Direction DIRECTION) { this.tickmarkDirection = DIRECTION; init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
java
public void setTickmarkDirection(final Direction DIRECTION) { this.tickmarkDirection = DIRECTION; init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
[ "public", "void", "setTickmarkDirection", "(", "final", "Direction", "DIRECTION", ")", "{", "this", ".", "tickmarkDirection", "=", "DIRECTION", ";", "init", "(", "getInnerBounds", "(", ")", ".", "width", ",", "getInnerBounds", "(", ")", ".", "height", ")", "...
Sets the direction of the tickmark label counting. CLOCKWISE will count in clockwise direction COUNTER_CLOCKWISE will count the opposite way @param DIRECTION
[ "Sets", "the", "direction", "of", "the", "tickmark", "label", "counting", ".", "CLOCKWISE", "will", "count", "in", "clockwise", "direction", "COUNTER_CLOCKWISE", "will", "count", "the", "opposite", "way" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java#L492-L496
3,773
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java
AbstractRadial.setPointerType
public void setPointerType(final PointerType POINTER_TYPE) { getModel().setPointerType(POINTER_TYPE); init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
java
public void setPointerType(final PointerType POINTER_TYPE) { getModel().setPointerType(POINTER_TYPE); init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
[ "public", "void", "setPointerType", "(", "final", "PointerType", "POINTER_TYPE", ")", "{", "getModel", "(", ")", ".", "setPointerType", "(", "POINTER_TYPE", ")", ";", "init", "(", "getInnerBounds", "(", ")", ".", "width", ",", "getInnerBounds", "(", ")", "."...
Sets the type of the pointer @param POINTER_TYPE type of the pointer PointerType.TYPE1 (default) PointerType.TYPE2 PointerType.TYPE3 PointerType.TYPE4
[ "Sets", "the", "type", "of", "the", "pointer" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java#L515-L519
3,774
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java
AbstractRadial.setPointerColor
public void setPointerColor(final ColorDef POINTER_COLOR) { getModel().setPointerColor(POINTER_COLOR); init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
java
public void setPointerColor(final ColorDef POINTER_COLOR) { getModel().setPointerColor(POINTER_COLOR); init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
[ "public", "void", "setPointerColor", "(", "final", "ColorDef", "POINTER_COLOR", ")", "{", "getModel", "(", ")", ".", "setPointerColor", "(", "POINTER_COLOR", ")", ";", "init", "(", "getInnerBounds", "(", ")", ".", "width", ",", "getInnerBounds", "(", ")", "....
Sets the color of the pointer @param POINTER_COLOR
[ "Sets", "the", "color", "of", "the", "pointer" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java#L533-L537
3,775
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java
AbstractRadial.setCustomPointerColor
public void setCustomPointerColor(final Color COLOR) { getModel().setCustomPointerColorObject(new CustomColorDef(COLOR)); init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
java
public void setCustomPointerColor(final Color COLOR) { getModel().setCustomPointerColorObject(new CustomColorDef(COLOR)); init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
[ "public", "void", "setCustomPointerColor", "(", "final", "Color", "COLOR", ")", "{", "getModel", "(", ")", ".", "setCustomPointerColorObject", "(", "new", "CustomColorDef", "(", "COLOR", ")", ")", ";", "init", "(", "getInnerBounds", "(", ")", ".", "width", "...
Sets the color from which the custom pointer color is calculated @param COLOR
[ "Sets", "the", "color", "from", "which", "the", "custom", "pointer", "color", "is", "calculated" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java#L569-L573
3,776
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java
AbstractRadial.setKnobType
public void setKnobType(final KnobType KNOB_TYPE) { getModel().setKnobType(KNOB_TYPE); init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
java
public void setKnobType(final KnobType KNOB_TYPE) { getModel().setKnobType(KNOB_TYPE); init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
[ "public", "void", "setKnobType", "(", "final", "KnobType", "KNOB_TYPE", ")", "{", "getModel", "(", ")", ".", "setKnobType", "(", "KNOB_TYPE", ")", ";", "init", "(", "getInnerBounds", "(", ")", ".", "width", ",", "getInnerBounds", "(", ")", ".", "height", ...
Sets the type of the knob @param KNOB_TYPE
[ "Sets", "the", "type", "of", "the", "knob" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java#L595-L599
3,777
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java
AbstractRadial.setKnobStyle
public void setKnobStyle(final KnobStyle KNOB_STYLE) { getModel().setKnobStyle(KNOB_STYLE); init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
java
public void setKnobStyle(final KnobStyle KNOB_STYLE) { getModel().setKnobStyle(KNOB_STYLE); init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
[ "public", "void", "setKnobStyle", "(", "final", "KnobStyle", "KNOB_STYLE", ")", "{", "getModel", "(", ")", ".", "setKnobStyle", "(", "KNOB_STYLE", ")", ";", "init", "(", "getInnerBounds", "(", ")", ".", "width", ",", "getInnerBounds", "(", ")", ".", "heigh...
Sets the the style of the center knob of a radial gauge @param KNOB_STYLE
[ "Sets", "the", "the", "style", "of", "the", "center", "knob", "of", "a", "radial", "gauge" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java#L613-L617
3,778
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java
AbstractRadial.setLcdVisible
public void setLcdVisible(final boolean LCD_VISIBLE) { getModel().setLcdVisible(LCD_VISIBLE); init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
java
public void setLcdVisible(final boolean LCD_VISIBLE) { getModel().setLcdVisible(LCD_VISIBLE); init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
[ "public", "void", "setLcdVisible", "(", "final", "boolean", "LCD_VISIBLE", ")", "{", "getModel", "(", ")", ".", "setLcdVisible", "(", "LCD_VISIBLE", ")", ";", "init", "(", "getInnerBounds", "(", ")", ".", "width", ",", "getInnerBounds", "(", ")", ".", "hei...
Enables or disables the visibility of the lcd display @param LCD_VISIBLE
[ "Enables", "or", "disables", "the", "visibility", "of", "the", "lcd", "display" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java#L631-L635
3,779
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java
AbstractRadial.setGlowColor
public void setGlowColor(final Color GLOW_COLOR) { getModel().setGlowColor(GLOW_COLOR); init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
java
public void setGlowColor(final Color GLOW_COLOR) { getModel().setGlowColor(GLOW_COLOR); init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
[ "public", "void", "setGlowColor", "(", "final", "Color", "GLOW_COLOR", ")", "{", "getModel", "(", ")", ".", "setGlowColor", "(", "GLOW_COLOR", ")", ";", "init", "(", "getInnerBounds", "(", ")", ".", "width", ",", "getInnerBounds", "(", ")", ".", "height", ...
Sets the color that will be used for the glow indicator @param GLOW_COLOR
[ "Sets", "the", "color", "that", "will", "be", "used", "for", "the", "glow", "indicator" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java#L1031-L1035
3,780
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java
AbstractRadial.setOuterFrameColor
public void setOuterFrameColor(final Paint OUTER_FRAME_COLOR) { FRAME_FACTORY.setOuterFrameColor(OUTER_FRAME_COLOR); init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
java
public void setOuterFrameColor(final Paint OUTER_FRAME_COLOR) { FRAME_FACTORY.setOuterFrameColor(OUTER_FRAME_COLOR); init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
[ "public", "void", "setOuterFrameColor", "(", "final", "Paint", "OUTER_FRAME_COLOR", ")", "{", "FRAME_FACTORY", ".", "setOuterFrameColor", "(", "OUTER_FRAME_COLOR", ")", ";", "init", "(", "getInnerBounds", "(", ")", ".", "width", ",", "getInnerBounds", "(", ")", ...
Sets the color of the small outer frame of the gauge @param OUTER_FRAME_COLOR
[ "Sets", "the", "color", "of", "the", "small", "outer", "frame", "of", "the", "gauge" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java#L1066-L1070
3,781
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java
AbstractRadial.setInnerFrameColor
public void setInnerFrameColor(final Paint INNER_FRAME_COLOR) { FRAME_FACTORY.setInnerFrameColor(INNER_FRAME_COLOR); init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
java
public void setInnerFrameColor(final Paint INNER_FRAME_COLOR) { FRAME_FACTORY.setInnerFrameColor(INNER_FRAME_COLOR); init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
[ "public", "void", "setInnerFrameColor", "(", "final", "Paint", "INNER_FRAME_COLOR", ")", "{", "FRAME_FACTORY", ".", "setInnerFrameColor", "(", "INNER_FRAME_COLOR", ")", ";", "init", "(", "getInnerBounds", "(", ")", ".", "width", ",", "getInnerBounds", "(", ")", ...
Sets the color of the small inner frame of the gauge @param INNER_FRAME_COLOR
[ "Sets", "the", "color", "of", "the", "small", "inner", "frame", "of", "the", "gauge" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java#L1084-L1088
3,782
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java
AbstractRadial.setTicklabelOrientation
public void setTicklabelOrientation(final TicklabelOrientation TICKLABEL_ORIENTATION) { getModel().setTicklabelOrienatation(TICKLABEL_ORIENTATION); init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
java
public void setTicklabelOrientation(final TicklabelOrientation TICKLABEL_ORIENTATION) { getModel().setTicklabelOrienatation(TICKLABEL_ORIENTATION); init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
[ "public", "void", "setTicklabelOrientation", "(", "final", "TicklabelOrientation", "TICKLABEL_ORIENTATION", ")", "{", "getModel", "(", ")", ".", "setTicklabelOrienatation", "(", "TICKLABEL_ORIENTATION", ")", ";", "init", "(", "getInnerBounds", "(", ")", ".", "width", ...
Sets the orientation of the tickmark labels @param TICKLABEL_ORIENTATION
[ "Sets", "the", "orientation", "of", "the", "tickmark", "labels" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java#L1120-L1124
3,783
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java
AbstractRadial.createSection3DEffectGradient
protected RadialGradientPaint createSection3DEffectGradient(final int WIDTH, final float RADIUS_FACTOR) { final float[] FRACTIONS; final Color[] COLORS; if (isExpandedSectionsEnabled()) { FRACTIONS = new float[]{ 0.0f, 0.7f, 0.75f, 0.96f, 1.0f }; COLORS = new Color[]{ new Color(0.0f, 0.0f, 0.0f, 1.0f), new Color(0.9f, 0.9f, 0.9f, 0.2f), new Color(1.0f, 1.0f, 1.0f, 0.5f), new Color(0.1843137255f, 0.1843137255f, 0.1843137255f, 0.3f), new Color(0.0f, 0.0f, 0.0f, 0.2f) }; } else { FRACTIONS = new float[]{ 0.0f, 0.89f, 0.955f, 1.0f }; COLORS = new Color[]{ new Color(0.0f, 0.0f, 0.0f, 0.0f), new Color(0.0f, 0.0f, 0.0f, 0.3f), new Color(1.0f, 1.0f, 1.0f, 0.6f), new Color(0.0f, 0.0f, 0.0f, 0.4f) }; } final Point2D GRADIENT_CENTER = new Point2D.Double(WIDTH / 2.0, WIDTH / 2.0); return new RadialGradientPaint(GRADIENT_CENTER, WIDTH * RADIUS_FACTOR, FRACTIONS, COLORS); }
java
protected RadialGradientPaint createSection3DEffectGradient(final int WIDTH, final float RADIUS_FACTOR) { final float[] FRACTIONS; final Color[] COLORS; if (isExpandedSectionsEnabled()) { FRACTIONS = new float[]{ 0.0f, 0.7f, 0.75f, 0.96f, 1.0f }; COLORS = new Color[]{ new Color(0.0f, 0.0f, 0.0f, 1.0f), new Color(0.9f, 0.9f, 0.9f, 0.2f), new Color(1.0f, 1.0f, 1.0f, 0.5f), new Color(0.1843137255f, 0.1843137255f, 0.1843137255f, 0.3f), new Color(0.0f, 0.0f, 0.0f, 0.2f) }; } else { FRACTIONS = new float[]{ 0.0f, 0.89f, 0.955f, 1.0f }; COLORS = new Color[]{ new Color(0.0f, 0.0f, 0.0f, 0.0f), new Color(0.0f, 0.0f, 0.0f, 0.3f), new Color(1.0f, 1.0f, 1.0f, 0.6f), new Color(0.0f, 0.0f, 0.0f, 0.4f) }; } final Point2D GRADIENT_CENTER = new Point2D.Double(WIDTH / 2.0, WIDTH / 2.0); return new RadialGradientPaint(GRADIENT_CENTER, WIDTH * RADIUS_FACTOR, FRACTIONS, COLORS); }
[ "protected", "RadialGradientPaint", "createSection3DEffectGradient", "(", "final", "int", "WIDTH", ",", "final", "float", "RADIUS_FACTOR", ")", "{", "final", "float", "[", "]", "FRACTIONS", ";", "final", "Color", "[", "]", "COLORS", ";", "if", "(", "isExpandedSe...
Returns a radial gradient paint that will be used as overlay for the track or section image to achieve some kind of a 3d effect. @param WIDTH @param RADIUS_FACTOR : 0.38f for the standard radial gauge @return a radial gradient paint that will be used as overlay for the track or section image
[ "Returns", "a", "radial", "gradient", "paint", "that", "will", "be", "used", "as", "overlay", "for", "the", "track", "or", "section", "image", "to", "achieve", "some", "kind", "of", "a", "3d", "effect", "." ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java#L1189-L1229
3,784
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java
AbstractRadial.createArea3DEffectGradient
protected RadialGradientPaint createArea3DEffectGradient(final int WIDTH, final float RADIUS_FACTOR) { final float[] FRACTIONS; final Color[] COLORS; FRACTIONS = new float[]{ 0.0f, 0.6f, 1.0f }; COLORS = new Color[]{ new Color(1.0f, 1.0f, 1.0f, 0.75f), new Color(1.0f, 1.0f, 1.0f, 0.0f), new Color(0.0f, 0.0f, 0.0f, 0.3f) }; final Point2D GRADIENT_CENTER = new Point2D.Double(WIDTH / 2.0, WIDTH / 2.0); return new RadialGradientPaint(GRADIENT_CENTER, WIDTH * RADIUS_FACTOR, FRACTIONS, COLORS); }
java
protected RadialGradientPaint createArea3DEffectGradient(final int WIDTH, final float RADIUS_FACTOR) { final float[] FRACTIONS; final Color[] COLORS; FRACTIONS = new float[]{ 0.0f, 0.6f, 1.0f }; COLORS = new Color[]{ new Color(1.0f, 1.0f, 1.0f, 0.75f), new Color(1.0f, 1.0f, 1.0f, 0.0f), new Color(0.0f, 0.0f, 0.0f, 0.3f) }; final Point2D GRADIENT_CENTER = new Point2D.Double(WIDTH / 2.0, WIDTH / 2.0); return new RadialGradientPaint(GRADIENT_CENTER, WIDTH * RADIUS_FACTOR, FRACTIONS, COLORS); }
[ "protected", "RadialGradientPaint", "createArea3DEffectGradient", "(", "final", "int", "WIDTH", ",", "final", "float", "RADIUS_FACTOR", ")", "{", "final", "float", "[", "]", "FRACTIONS", ";", "final", "Color", "[", "]", "COLORS", ";", "FRACTIONS", "=", "new", ...
Returns a radial gradient paint that will be used as overlay for the track or area image to achieve some kind of a 3d effect. @param WIDTH @param RADIUS_FACTOR @return a radial gradient paint that will be used as overlay for the track or area image
[ "Returns", "a", "radial", "gradient", "paint", "that", "will", "be", "used", "as", "overlay", "for", "the", "track", "or", "area", "image", "to", "achieve", "some", "kind", "of", "a", "3d", "effect", "." ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java#L1238-L1255
3,785
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java
AbstractRadial.create_FRAME_Image
protected BufferedImage create_FRAME_Image(final int WIDTH) { switch (getFrameType()) { case ROUND: return FRAME_FACTORY.createRadialFrame(WIDTH, getFrameDesign(), getCustomFrameDesign(), getFrameBaseColor(), isFrameBaseColorEnabled(), getFrameEffect()); case SQUARE: return FRAME_FACTORY.createLinearFrame(WIDTH, getFrameDesign(), getCustomFrameDesign(), getFrameBaseColor(), isFrameBaseColorEnabled(), getFrameEffect()); default: return FRAME_FACTORY.createRadialFrame(WIDTH, getFrameDesign(), getCustomFrameDesign(), getFrameBaseColor(), isFrameBaseColorEnabled(), getFrameEffect()); } }
java
protected BufferedImage create_FRAME_Image(final int WIDTH) { switch (getFrameType()) { case ROUND: return FRAME_FACTORY.createRadialFrame(WIDTH, getFrameDesign(), getCustomFrameDesign(), getFrameBaseColor(), isFrameBaseColorEnabled(), getFrameEffect()); case SQUARE: return FRAME_FACTORY.createLinearFrame(WIDTH, getFrameDesign(), getCustomFrameDesign(), getFrameBaseColor(), isFrameBaseColorEnabled(), getFrameEffect()); default: return FRAME_FACTORY.createRadialFrame(WIDTH, getFrameDesign(), getCustomFrameDesign(), getFrameBaseColor(), isFrameBaseColorEnabled(), getFrameEffect()); } }
[ "protected", "BufferedImage", "create_FRAME_Image", "(", "final", "int", "WIDTH", ")", "{", "switch", "(", "getFrameType", "(", ")", ")", "{", "case", "ROUND", ":", "return", "FRAME_FACTORY", ".", "createRadialFrame", "(", "WIDTH", ",", "getFrameDesign", "(", ...
Returns the frame image with the currently active framedesign with the given width and the current frame type. @param WIDTH @return buffered image containing the frame in the active frame design
[ "Returns", "the", "frame", "image", "with", "the", "currently", "active", "framedesign", "with", "the", "given", "width", "and", "the", "current", "frame", "type", "." ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java#L1263-L1272
3,786
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java
AbstractRadial.create_KNOB_Image
private BufferedImage create_KNOB_Image(final int WIDTH, final KnobType KNOB_TYPE, final KnobStyle KNOB_STYLE) { return KNOB_FACTORY.create_KNOB_Image(WIDTH, KNOB_TYPE, KNOB_STYLE); }
java
private BufferedImage create_KNOB_Image(final int WIDTH, final KnobType KNOB_TYPE, final KnobStyle KNOB_STYLE) { return KNOB_FACTORY.create_KNOB_Image(WIDTH, KNOB_TYPE, KNOB_STYLE); }
[ "private", "BufferedImage", "create_KNOB_Image", "(", "final", "int", "WIDTH", ",", "final", "KnobType", "KNOB_TYPE", ",", "final", "KnobStyle", "KNOB_STYLE", ")", "{", "return", "KNOB_FACTORY", ".", "create_KNOB_Image", "(", "WIDTH", ",", "KNOB_TYPE", ",", "KNOB_...
Creates a single alignment post image that could be placed on all the positions where it is needed @param WIDTH @param KNOB_TYPE @return a buffered image that contains a single alignment post of the given type
[ "Creates", "a", "single", "alignment", "post", "image", "that", "could", "be", "placed", "on", "all", "the", "positions", "where", "it", "is", "needed" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java#L2822-L2824
3,787
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java
AbstractRadial.create_MEASURED_VALUE_Image
protected BufferedImage create_MEASURED_VALUE_Image(final int WIDTH, final Color COLOR, final double ROTATION_OFFSET) { if (WIDTH <= 36) // 36 is needed otherwise the image size could be smaller than 1 { return UTIL.createImage(1, 1, Transparency.TRANSLUCENT); } final int IMAGE_HEIGHT = (int) (WIDTH * 0.0280373832); final int IMAGE_WIDTH = IMAGE_HEIGHT; final BufferedImage IMAGE = UTIL.createImage(IMAGE_WIDTH, IMAGE_HEIGHT, Transparency.TRANSLUCENT); final Graphics2D G2 = IMAGE.createGraphics(); G2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); G2.rotate(ROTATION_OFFSET, IMAGE_WIDTH / 2.0, IMAGE_HEIGHT / 2.0); final GeneralPath INDICATOR = new GeneralPath(); INDICATOR.setWindingRule(Path2D.WIND_EVEN_ODD); INDICATOR.moveTo(IMAGE_WIDTH * 0.5, IMAGE_HEIGHT); INDICATOR.lineTo(0.0, 0.0); INDICATOR.lineTo(IMAGE_WIDTH, 0.0); INDICATOR.closePath(); G2.setColor(COLOR); G2.fill(INDICATOR); G2.dispose(); return IMAGE; }
java
protected BufferedImage create_MEASURED_VALUE_Image(final int WIDTH, final Color COLOR, final double ROTATION_OFFSET) { if (WIDTH <= 36) // 36 is needed otherwise the image size could be smaller than 1 { return UTIL.createImage(1, 1, Transparency.TRANSLUCENT); } final int IMAGE_HEIGHT = (int) (WIDTH * 0.0280373832); final int IMAGE_WIDTH = IMAGE_HEIGHT; final BufferedImage IMAGE = UTIL.createImage(IMAGE_WIDTH, IMAGE_HEIGHT, Transparency.TRANSLUCENT); final Graphics2D G2 = IMAGE.createGraphics(); G2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); G2.rotate(ROTATION_OFFSET, IMAGE_WIDTH / 2.0, IMAGE_HEIGHT / 2.0); final GeneralPath INDICATOR = new GeneralPath(); INDICATOR.setWindingRule(Path2D.WIND_EVEN_ODD); INDICATOR.moveTo(IMAGE_WIDTH * 0.5, IMAGE_HEIGHT); INDICATOR.lineTo(0.0, 0.0); INDICATOR.lineTo(IMAGE_WIDTH, 0.0); INDICATOR.closePath(); G2.setColor(COLOR); G2.fill(INDICATOR); G2.dispose(); return IMAGE; }
[ "protected", "BufferedImage", "create_MEASURED_VALUE_Image", "(", "final", "int", "WIDTH", ",", "final", "Color", "COLOR", ",", "final", "double", "ROTATION_OFFSET", ")", "{", "if", "(", "WIDTH", "<=", "36", ")", "// 36 is needed otherwise the image size could be smalle...
Returns the image of the MinMeasuredValue and MaxMeasuredValue dependend @param WIDTH @param COLOR @param ROTATION_OFFSET @return the image of the min or max measured value
[ "Returns", "the", "image", "of", "the", "MinMeasuredValue", "and", "MaxMeasuredValue", "dependend" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java#L2923-L2951
3,788
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java
AbstractRadial.create_FOREGROUND_Image
protected BufferedImage create_FOREGROUND_Image(final int WIDTH) { switch (getFrameType()) { case ROUND: return FOREGROUND_FACTORY.createRadialForeground(WIDTH); case SQUARE: return FOREGROUND_FACTORY.createLinearForeground(WIDTH, WIDTH); default: return FOREGROUND_FACTORY.createRadialForeground(WIDTH); } }
java
protected BufferedImage create_FOREGROUND_Image(final int WIDTH) { switch (getFrameType()) { case ROUND: return FOREGROUND_FACTORY.createRadialForeground(WIDTH); case SQUARE: return FOREGROUND_FACTORY.createLinearForeground(WIDTH, WIDTH); default: return FOREGROUND_FACTORY.createRadialForeground(WIDTH); } }
[ "protected", "BufferedImage", "create_FOREGROUND_Image", "(", "final", "int", "WIDTH", ")", "{", "switch", "(", "getFrameType", "(", ")", ")", "{", "case", "ROUND", ":", "return", "FOREGROUND_FACTORY", ".", "createRadialForeground", "(", "WIDTH", ")", ";", "case...
Returns the image of the glasseffect with a centered knob @param WIDTH @return the foreground image that will be used (in principle only the glass effect)
[ "Returns", "the", "image", "of", "the", "glasseffect", "with", "a", "centered", "knob" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java#L3023-L3032
3,789
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/extras/Horizon.java
Horizon.setPitch
public void setPitch(final double PITCH) { this.pitch = PITCH % 180; if (pitch > 90) { pitch = 90 - (pitch - 90); if (!upsidedown) { setRoll(roll - 180); } upsidedown = true; } else if (pitch < -90) { pitch = -90 + (-90 - pitch); if (!upsidedown) { setRoll(roll + 180); } upsidedown = true; } else { upsidedown = false; this.oldPitch = pitch; } fireStateChanged(); repaint(); }
java
public void setPitch(final double PITCH) { this.pitch = PITCH % 180; if (pitch > 90) { pitch = 90 - (pitch - 90); if (!upsidedown) { setRoll(roll - 180); } upsidedown = true; } else if (pitch < -90) { pitch = -90 + (-90 - pitch); if (!upsidedown) { setRoll(roll + 180); } upsidedown = true; } else { upsidedown = false; this.oldPitch = pitch; } fireStateChanged(); repaint(); }
[ "public", "void", "setPitch", "(", "final", "double", "PITCH", ")", "{", "this", ".", "pitch", "=", "PITCH", "%", "180", ";", "if", "(", "pitch", ">", "90", ")", "{", "pitch", "=", "90", "-", "(", "pitch", "-", "90", ")", ";", "if", "(", "!", ...
Sets the value of the current pitch @param PITCH
[ "Sets", "the", "value", "of", "the", "current", "pitch" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/extras/Horizon.java#L276-L297
3,790
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/extras/Horizon.java
Horizon.setCustomSkyColor
public void setCustomSkyColor(final Color CUSTOM_SKY_COLOR) { customSkyColor = CUSTOM_SKY_COLOR; init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
java
public void setCustomSkyColor(final Color CUSTOM_SKY_COLOR) { customSkyColor = CUSTOM_SKY_COLOR; init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
[ "public", "void", "setCustomSkyColor", "(", "final", "Color", "CUSTOM_SKY_COLOR", ")", "{", "customSkyColor", "=", "CUSTOM_SKY_COLOR", ";", "init", "(", "getInnerBounds", "(", ")", ".", "width", ",", "getInnerBounds", "(", ")", ".", "height", ")", ";", "repain...
Sets the custom color that will be used for visualization of the sky @param CUSTOM_SKY_COLOR
[ "Sets", "the", "custom", "color", "that", "will", "be", "used", "for", "visualization", "of", "the", "sky" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/extras/Horizon.java#L344-L348
3,791
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/extras/Horizon.java
Horizon.setCustomGroundColor
public void setCustomGroundColor(final Color CUSTOM_GROUND_COLOR) { customGroundColor = CUSTOM_GROUND_COLOR; init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
java
public void setCustomGroundColor(final Color CUSTOM_GROUND_COLOR) { customGroundColor = CUSTOM_GROUND_COLOR; init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
[ "public", "void", "setCustomGroundColor", "(", "final", "Color", "CUSTOM_GROUND_COLOR", ")", "{", "customGroundColor", "=", "CUSTOM_GROUND_COLOR", ";", "init", "(", "getInnerBounds", "(", ")", ".", "width", ",", "getInnerBounds", "(", ")", ".", "height", ")", ";...
Sets the custom color that will be used for visualization of the ground @param CUSTOM_GROUND_COLOR
[ "Sets", "the", "custom", "color", "that", "will", "be", "used", "for", "visualization", "of", "the", "ground" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/extras/Horizon.java#L362-L366
3,792
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/Radial1Vertical.java
Radial1Vertical.setOrientation
@Override public void setOrientation(final Orientation ORIENTATION) { super.setOrientation(ORIENTATION); switch (ORIENTATION) { case NORTH: setLedPosition(0.455, 0.51); setUserLedPosition(0.455, 0.58); break; case EAST: break; case SOUTH: break; case WEST: setLedPosition(0.455, 0.51); setUserLedPosition(0.455, 0.58); break; default: setLedPosition(0.455, 0.51); setUserLedPosition(0.455, 0.58); break; } init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
java
@Override public void setOrientation(final Orientation ORIENTATION) { super.setOrientation(ORIENTATION); switch (ORIENTATION) { case NORTH: setLedPosition(0.455, 0.51); setUserLedPosition(0.455, 0.58); break; case EAST: break; case SOUTH: break; case WEST: setLedPosition(0.455, 0.51); setUserLedPosition(0.455, 0.58); break; default: setLedPosition(0.455, 0.51); setUserLedPosition(0.455, 0.58); break; } init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
[ "@", "Override", "public", "void", "setOrientation", "(", "final", "Orientation", "ORIENTATION", ")", "{", "super", ".", "setOrientation", "(", "ORIENTATION", ")", ";", "switch", "(", "ORIENTATION", ")", "{", "case", "NORTH", ":", "setLedPosition", "(", "0.455...
Sets the orientation of the gauge as an int value that is defined in javax.swing.SwingUtilities 1 => NORTH => Pointer rotation center placed on the bottom of the gauge 3 => EAST => Pointer rotation center placed on the left side of the gauge 5 => SOUTH => Pointer rotation center placed on the top of the gauge 7 => WEST => Pointer rotation center placed on the left side of the gauge @param ORIENTATION
[ "Sets", "the", "orientation", "of", "the", "gauge", "as", "an", "int", "value", "that", "is", "defined", "in", "javax", ".", "swing", ".", "SwingUtilities", "1", "=", ">", "NORTH", "=", ">", "Pointer", "rotation", "center", "placed", "on", "the", "bottom...
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/Radial1Vertical.java#L522-L545
3,793
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/extras/Indicator.java
Indicator.setSymbolType
public void setSymbolType(final SymbolType SYMBOL_TYPE) { symbolType = SYMBOL_TYPE; init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
java
public void setSymbolType(final SymbolType SYMBOL_TYPE) { symbolType = SYMBOL_TYPE; init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
[ "public", "void", "setSymbolType", "(", "final", "SymbolType", "SYMBOL_TYPE", ")", "{", "symbolType", "=", "SYMBOL_TYPE", ";", "init", "(", "getInnerBounds", "(", ")", ".", "width", ",", "getInnerBounds", "(", ")", ".", "height", ")", ";", "repaint", "(", ...
Sets the type of symbol that will be drawn on the indicator @param SYMBOL_TYPE
[ "Sets", "the", "type", "of", "symbol", "that", "will", "be", "drawn", "on", "the", "indicator" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/extras/Indicator.java#L207-L211
3,794
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/extras/Indicator.java
Indicator.setOn
public void setOn(final boolean ON) { on = ON; init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
java
public void setOn(final boolean ON) { on = ON; init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
[ "public", "void", "setOn", "(", "final", "boolean", "ON", ")", "{", "on", "=", "ON", ";", "init", "(", "getInnerBounds", "(", ")", ".", "width", ",", "getInnerBounds", "(", ")", ".", "height", ")", ";", "repaint", "(", "getInnerBounds", "(", ")", ")"...
Sets the symbol to on or off @param ON
[ "Sets", "the", "symbol", "to", "on", "or", "off" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/extras/Indicator.java#L225-L229
3,795
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/extras/Indicator.java
Indicator.setOnColor
public void setOnColor(final ColorDef ON_COLOR) { onColor = ON_COLOR; init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
java
public void setOnColor(final ColorDef ON_COLOR) { onColor = ON_COLOR; init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
[ "public", "void", "setOnColor", "(", "final", "ColorDef", "ON_COLOR", ")", "{", "onColor", "=", "ON_COLOR", ";", "init", "(", "getInnerBounds", "(", ")", ".", "width", ",", "getInnerBounds", "(", ")", ".", "height", ")", ";", "repaint", "(", "getInnerBound...
Sets the color definition that is used to visualize the on state of the symbol @param ON_COLOR
[ "Sets", "the", "color", "definition", "that", "is", "used", "to", "visualize", "the", "on", "state", "of", "the", "symbol" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/extras/Indicator.java#L243-L247
3,796
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/extras/Indicator.java
Indicator.setCustomOnColor
public void setCustomOnColor(final CustomColorDef CUSTOM_ON_COLOR) { customOnColor = CUSTOM_ON_COLOR; init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
java
public void setCustomOnColor(final CustomColorDef CUSTOM_ON_COLOR) { customOnColor = CUSTOM_ON_COLOR; init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
[ "public", "void", "setCustomOnColor", "(", "final", "CustomColorDef", "CUSTOM_ON_COLOR", ")", "{", "customOnColor", "=", "CUSTOM_ON_COLOR", ";", "init", "(", "getInnerBounds", "(", ")", ".", "width", ",", "getInnerBounds", "(", ")", ".", "height", ")", ";", "r...
Sets the custom color definition that will be used to visualize the on state of the symbol @param CUSTOM_ON_COLOR
[ "Sets", "the", "custom", "color", "definition", "that", "will", "be", "used", "to", "visualize", "the", "on", "state", "of", "the", "symbol" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/extras/Indicator.java#L261-L265
3,797
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/extras/Indicator.java
Indicator.setOffColor
public void setOffColor(final ColorDef OFF_COLOR) { offColor = OFF_COLOR; init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
java
public void setOffColor(final ColorDef OFF_COLOR) { offColor = OFF_COLOR; init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
[ "public", "void", "setOffColor", "(", "final", "ColorDef", "OFF_COLOR", ")", "{", "offColor", "=", "OFF_COLOR", ";", "init", "(", "getInnerBounds", "(", ")", ".", "width", ",", "getInnerBounds", "(", ")", ".", "height", ")", ";", "repaint", "(", "getInnerB...
Sets the color definition that will be used to visualize the off state of the symbol @param OFF_COLOR
[ "Sets", "the", "color", "definition", "that", "will", "be", "used", "to", "visualize", "the", "off", "state", "of", "the", "symbol" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/extras/Indicator.java#L279-L283
3,798
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/extras/Indicator.java
Indicator.setCustomOffColor
public void setCustomOffColor(final CustomColorDef CUSTOM_OFF_COLOR) { customOffColor = CUSTOM_OFF_COLOR; init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
java
public void setCustomOffColor(final CustomColorDef CUSTOM_OFF_COLOR) { customOffColor = CUSTOM_OFF_COLOR; init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
[ "public", "void", "setCustomOffColor", "(", "final", "CustomColorDef", "CUSTOM_OFF_COLOR", ")", "{", "customOffColor", "=", "CUSTOM_OFF_COLOR", ";", "init", "(", "getInnerBounds", "(", ")", ".", "width", ",", "getInnerBounds", "(", ")", ".", "height", ")", ";", ...
Sets the custom color definition that is used to visualize the off state of the symbol @param CUSTOM_OFF_COLOR
[ "Sets", "the", "custom", "color", "definition", "that", "is", "used", "to", "visualize", "the", "off", "state", "of", "the", "symbol" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/extras/Indicator.java#L297-L301
3,799
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/extras/WindDirection.java
WindDirection.setPointer2Color
public void setPointer2Color(final ColorDef POINTER2_COLOR) { pointer2Color = POINTER2_COLOR; init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
java
public void setPointer2Color(final ColorDef POINTER2_COLOR) { pointer2Color = POINTER2_COLOR; init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
[ "public", "void", "setPointer2Color", "(", "final", "ColorDef", "POINTER2_COLOR", ")", "{", "pointer2Color", "=", "POINTER2_COLOR", ";", "init", "(", "getInnerBounds", "(", ")", ".", "width", ",", "getInnerBounds", "(", ")", ".", "height", ")", ";", "repaint",...
Sets the colordefinition of the second pointer @param POINTER2_COLOR
[ "Sets", "the", "colordefinition", "of", "the", "second", "pointer" ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/extras/WindDirection.java#L390-L394