本文整理汇总了Java中eu.hansolo.medusa.Gauge.getLocale方法的典型用法代码示例。如果您正苦于以下问题:Java Gauge.getLocale方法的具体用法?Java Gauge.getLocale怎么用?Java Gauge.getLocale使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eu.hansolo.medusa.Gauge
的用法示例。
在下文中一共展示了Gauge.getLocale方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: InteractiveGaugeSkin
import eu.hansolo.medusa.Gauge; //导入方法依赖的package包/类
public InteractiveGaugeSkin(Gauge gauge) {
super(gauge);
if (gauge.isAutoScale()) gauge.calcAutoScale();
startAngle = gauge.getStartAngle();
angleRange = gauge.getAngleRange();
angleStep = gauge.getAngleStep();
oldValue = gauge.getValue();
minValue = gauge.getMinValue();
maxValue = gauge.getMaxValue();
formatString = new StringBuilder("%.").append(Integer.toString(gauge.getDecimals())).append("f").toString();
locale = gauge.getLocale();
sections = gauge.getSections();
highlightSections = gauge.isHighlightSections();
sectionsVisible = gauge.getSectionsVisible();
areas = gauge.getAreas();
highlightAreas = gauge.isHighlightAreas();
areasVisible = gauge.getAreasVisible();
tickLabelLocation = gauge.getTickLabelLocation();
scaleDirection = gauge.getScaleDirection();
needleBehavior = gauge.getNeedleBehavior();
mouseHandler = event -> handleMouseEvent(event);
updateMarkers();
initGraphics();
registerListeners();
}
示例2: TileSparklineSkin
import eu.hansolo.medusa.Gauge; //导入方法依赖的package包/类
public TileSparklineSkin(Gauge gauge) {
super(gauge);
if (gauge.isAutoScale()) gauge.calcAutoScale();
low = gauge.getMaxValue();
high = gauge.getMinValue();
minValue = gauge.getMinValue();
maxValue = gauge.getMaxValue();
range = gauge.getRange();
stdDeviation = 0;
formatString = new StringBuilder("%.").append(Integer.toString(gauge.getDecimals())).append("f").toString();
locale = gauge.getLocale();
noOfDatapoints = gauge.getAveragingPeriod();
dataList = new LinkedList<>();
currentValueListener = o -> handleEvents("VALUE");
averagingListener = o -> handleEvents("AVERAGING_PERIOD");
for (int i = 0; i < noOfDatapoints; i++) { dataList.add(minValue); }
// To get smooth lines in the chart we need at least 4 values
if (noOfDatapoints < 4) throw new IllegalArgumentException("Please increase the averaging period to a value larger than 3.");
initGraphics();
registerListeners();
}
示例3: AmpSkin
import eu.hansolo.medusa.Gauge; //导入方法依赖的package包/类
public AmpSkin(Gauge gauge) {
super(gauge);
if (gauge.isAutoScale()) gauge.calcAutoScale();
angleStep = gauge.getAngleRange() / gauge.getRange();
oldValue = gauge.getValue();
formatString = new StringBuilder("%.").append(Integer.toString(gauge.getDecimals())).append("f").toString();
locale = gauge.getLocale();
sectionListener = c -> redraw();
currentValueListener = o -> rotateNeedle();
needleRotateListener = o -> handleEvents("ANGLE");
markerListener = c -> {
updateMarkers();
redraw();
};
updateMarkers();
initGraphics();
registerListeners();
}
示例4: DashboardSkin
import eu.hansolo.medusa.Gauge; //导入方法依赖的package包/类
public DashboardSkin(Gauge gauge) {
super(gauge);
if (gauge.isAutoScale()) gauge.calcAutoScale();
range = gauge.getRange();
angleStep = ANGLE_RANGE / range;
colorGradientEnabled = gauge.isGradientBarEnabled();
noOfGradientStops = gauge.getGradientBarStops().size();
sectionsVisible = gauge.getSectionsVisible();
sections = gauge.getSections();
currentValueAngle = 0;
formatString = new StringBuilder("%.").append(Integer.toString(gauge.getDecimals())).append("f").toString();
otherFormatString = new StringBuilder("%.").append(Integer.toString(gauge.getTickLabelDecimals())).append("f").toString();
locale = gauge.getLocale();
currentValueListener = o -> setBar(gauge.getCurrentValue());
initGraphics();
registerListeners();
setBar(gauge.getValue());
}
示例5: ModernSkin
import eu.hansolo.medusa.Gauge; //导入方法依赖的package包/类
public ModernSkin(Gauge gauge) {
super(gauge);
if (gauge.isAutoScale()) gauge.calcAutoScale();
angleStep = ANGLE_RANGE / (gauge.getRange());
mouseHandler = event -> handleMouseEvent(event);
buttonTooltip = new Tooltip();
locale = gauge.getLocale();
sectionsVisible = gauge.getSectionsVisible();
sections = gauge.getSections();
barColor = gauge.getBarColor();
thresholdColor = gauge.getThresholdColor();
animatedListener = o -> handleEvents("ANIMATED");
sectionListener = c -> handleEvents("RESIZE");
currentValueListener = o -> rotateNeedle(gauge.getCurrentValue());
initGraphics();
registerListeners();
}
示例6: TileKpiSkin
import eu.hansolo.medusa.Gauge; //导入方法依赖的package包/类
public TileKpiSkin(Gauge gauge) {
super(gauge);
if (gauge.isAutoScale()) gauge.calcAutoScale();
angleRange = Helper.clamp(90.0, 180.0, gauge.getAngleRange());
oldValue = gauge.getValue();
minValue = gauge.getMinValue();
threshold = gauge.getThreshold();
thresholdColor = gauge.getThresholdColor();
range = gauge.getRange();
angleStep = angleRange / range;
formatString = new StringBuilder("%.").append(Integer.toString(gauge.getDecimals())).append("f").toString();
locale = gauge.getLocale();
sectionsVisible = gauge.getSectionsVisible();
highlightSections = gauge.isHighlightSections();
sections = gauge.getSections();
sectionMap = new HashMap<>(sections.size());
currentValueListener = o -> rotateNeedle(gauge.getCurrentValue());
for(Section section : sections) { sectionMap.put(section, new Arc()); }
initGraphics();
registerListeners();
rotateNeedle(gauge.getCurrentValue());
}
示例7: LcdSkin
import eu.hansolo.medusa.Gauge; //导入方法依赖的package包/类
public LcdSkin(Gauge gauge) {
super(gauge);
width = PREFERRED_WIDTH;
height = PREFERRED_HEIGHT;
valueOffsetLeft = 0.0;
valueOffsetRight = 0.0;
digitalFontSizeFactor = 1.0;
backgroundTextBuilder = new StringBuilder();
valueFormatString = new StringBuilder("%.").append(Integer.toString(gauge.getDecimals())).append("f").toString();
otherFormatString = new StringBuilder("%.").append(Integer.toString(gauge.getTickLabelDecimals())).append("f").toString();
locale = gauge.getLocale();
sections = gauge.getSections();
sectionColorMap = new HashMap<>(sections.size());
currentValueListener = o -> handleEvents("REDRAW");
updateSectionColors();
FOREGROUND_SHADOW.setOffsetX(0);
FOREGROUND_SHADOW.setOffsetY(1);
FOREGROUND_SHADOW.setColor(Color.rgb(0, 0, 0, 0.5));
FOREGROUND_SHADOW.setBlurType(BlurType.TWO_PASS_BOX);
FOREGROUND_SHADOW.setRadius(2);
initGraphics();
registerListeners();
}
示例8: DigitalSkin
import eu.hansolo.medusa.Gauge; //导入方法依赖的package包/类
public DigitalSkin(Gauge gauge) {
super(gauge);
if (gauge.isAutoScale()) gauge.calcAutoScale();
minValue = gauge.getMinValue();
maxValue = gauge.getMaxValue();
range = gauge.getRange();
angleStep = ANGLE_RANGE / range;
locale = gauge.getLocale();
barColor = gauge.getBarColor();
valueColor = gauge.getValueColor();
titleColor = gauge.getTitleColor();
subTitleColor = gauge.getSubTitleColor();
unitColor = gauge.getUnitColor();
isStartFromZero = gauge.isStartFromZero();
sectionsVisible = gauge.getSectionsVisible();
sections = gauge.getSections();
thresholdVisible = gauge.isThresholdVisible();
thresholdColor = gauge.getThresholdColor();
currentValueListener = o -> setBar(gauge.getCurrentValue());
initGraphics();
registerListeners();
setBar(gauge.getCurrentValue());
}
示例9: KpiSkin
import eu.hansolo.medusa.Gauge; //导入方法依赖的package包/类
public KpiSkin(Gauge gauge) {
super(gauge);
if (gauge.isAutoScale()) gauge.calcAutoScale();
angleRange = Helper.clamp(90.0, 180.0, gauge.getAngleRange());
oldValue = gauge.getValue();
minValue = gauge.getMinValue();
range = gauge.getRange();
angleStep = angleRange / range;
locale = gauge.getLocale();
currentValueListener = o -> rotateNeedle(gauge.getCurrentValue());
initGraphics();
registerListeners();
rotateNeedle(gauge.getCurrentValue());
}
示例10: LinearSkin
import eu.hansolo.medusa.Gauge; //导入方法依赖的package包/类
public LinearSkin(Gauge gauge) {
super(gauge);
if (gauge.isAutoScale()) gauge.calcAutoScale();
orientation = gauge.getOrientation();
tickLabelFormatString = new StringBuilder("%.").append(Integer.toString(gauge.getTickLabelDecimals())).append("f").toString();
locale = gauge.getLocale();
sections = gauge.getSections();
areas = gauge.getAreas();
currentValueListener = o -> setBar(gauge.getCurrentValue());
paneSizeListener = o -> handleEvents("RESIZE");
if (Orientation.VERTICAL == orientation) {
preferredWidth = 140;
preferredHeight = 350;
} else {
preferredWidth = 350;
preferredHeight = 140;
}
initGraphics();
registerListeners();
}
示例11: TinySkin
import eu.hansolo.medusa.Gauge; //导入方法依赖的package包/类
public TinySkin(Gauge gauge) {
super(gauge);
if (gauge.isAutoScale()) gauge.calcAutoScale();
oldValue = gauge.getValue();
minValue = gauge.getMinValue();
maxValue = gauge.getMaxValue();
range = gauge.getRange();
angleStep = ANGLE_RANGE / range;
colorGradientEnabled = gauge.isGradientBarEnabled();
noOfGradientStops = gauge.getGradientBarStops().size();
sections = gauge.getSections();
formatString = new StringBuilder("%.").append(Integer.toString(gauge.getDecimals())).append("f").toString();
locale = gauge.getLocale();
currentValueListener = o -> rotateNeedle(gauge.getCurrentValue());
initGraphics();
registerListeners();
rotateNeedle(gauge.getCurrentValue());
redraw();
}
示例12: IndicatorSkin
import eu.hansolo.medusa.Gauge; //导入方法依赖的package包/类
public IndicatorSkin(Gauge gauge) {
super(gauge);
if (gauge.isAutoScale()) gauge.calcAutoScale();
angleRange = Helper.clamp(90.0, 180.0, gauge.getAngleRange());
startAngle = getStartAngle();
oldValue = gauge.getValue();
minValue = gauge.getMinValue();
range = gauge.getRange();
angleStep = angleRange / range;
colorGradientEnabled = gauge.isGradientBarEnabled();
noOfGradientStops = gauge.getGradientBarStops().size();
sectionsAlwaysVisible = gauge.getSectionsAlwaysVisible();
sectionsVisible = gauge.getSectionsVisible();
sections = gauge.getSections();
formatString = new StringBuilder("%.").append(Integer.toString(gauge.getDecimals())).append("f").toString();
locale = gauge.getLocale();
barColor = gauge.getBarColor();
currentValueListener = o -> rotateNeedle(gauge.getCurrentValue());
sectionAlwaysVisibleListener = o -> bar.setVisible(!gauge.getSectionsAlwaysVisible());
initGraphics();
registerListeners();
rotateNeedle(gauge.getCurrentValue());
}
示例13: TileTextKpiSkin
import eu.hansolo.medusa.Gauge; //导入方法依赖的package包/类
public TileTextKpiSkin(Gauge gauge) {
super(gauge);
if (gauge.isAutoScale()) gauge.calcAutoScale();
minValue = gauge.getMinValue();
maxValue = gauge.getMaxValue();
range = gauge.getRange();
stepSize = PREFERRED_WIDTH / range;
formatString = new StringBuilder("%.").append(Integer.toString(gauge.getDecimals())).append("f").toString();
locale = gauge.getLocale();
sections = gauge.getSections();
sectionsVisible = gauge.getSectionsVisible();
barColor = gauge.getBarColor();
currentValueListener = o -> setBar(gauge.getCurrentValue());
initGraphics();
registerListeners();
setBar(gauge.getCurrentValue());
}
示例14: HSkin
import eu.hansolo.medusa.Gauge; //导入方法依赖的package包/类
public HSkin(Gauge gauge) {
super(gauge);
if (gauge.isAutoScale()) gauge.calcAutoScale();
angleRange = Helper.clamp(90.0, 180.0, gauge.getAngleRange());
startAngle = getStartAngle();
angleStep = angleRange / gauge.getRange();
oldValue = gauge.getValue();
minValue = gauge.getMinValue();
maxValue = gauge.getMaxValue();
formatString = new StringBuilder("%.").append(Integer.toString(gauge.getDecimals())).append("f").toString();
locale = gauge.getLocale();
sections = gauge.getSections();
highlightSections = gauge.isHighlightSections();
sectionsVisible = gauge.getSectionsVisible();
areas = gauge.getAreas();
highlightAreas = gauge.isHighlightAreas();
areasVisible = gauge.getAreasVisible();
tickLabelLocation = gauge.getTickLabelLocation();
scaleDirection = gauge.getScaleDirection();
mouseHandler = e -> handleMouseEvent(e);
currentValueListener = o -> rotateNeedle(gauge.getCurrentValue());
markerListener = c -> {
updateMarkers();
redraw();
};
updateMarkers();
initGraphics();
registerListeners();
}
示例15: QuarterSkin
import eu.hansolo.medusa.Gauge; //导入方法依赖的package包/类
public QuarterSkin(Gauge gauge) {
super(gauge);
if (gauge.isAutoScale()) gauge.calcAutoScale();
startAngle = getStartAngle();
angleStep = ANGLE_RANGE / gauge.getRange();
oldValue = gauge.getValue();
minValue = gauge.getMinValue();
maxValue = gauge.getMaxValue();
formatString = new StringBuilder("%.").append(Integer.toString(gauge.getDecimals())).append("f").toString();
locale = gauge.getLocale();
sections = gauge.getSections();
highlightSections = gauge.isHighlightSections();
sectionsVisible = gauge.getSectionsVisible();
areas = gauge.getAreas();
highlightAreas = gauge.isHighlightAreas();
areasVisible = gauge.getAreasVisible();
tickLabelLocation = gauge.getTickLabelLocation();
scaleDirection = gauge.getScaleDirection();
mouseHandler = e -> handleMouseEvent(e);
markerListener = c -> {
updateMarkers();
redraw();
};
currentValueListener = o -> rotateNeedle(gauge.getCurrentValue());
updateMarkers();
initGraphics();
registerListeners();
}