本文整理汇总了Java中eu.hansolo.medusa.Gauge.getBarColor方法的典型用法代码示例。如果您正苦于以下问题:Java Gauge.getBarColor方法的具体用法?Java Gauge.getBarColor怎么用?Java Gauge.getBarColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eu.hansolo.medusa.Gauge
的用法示例。
在下文中一共展示了Gauge.getBarColor方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: CustomGaugeSkin
import eu.hansolo.medusa.Gauge; //导入方法依赖的package包/类
public CustomGaugeSkin(Gauge gauge) {
super(gauge);
if (gauge.isAutoScale()) gauge.calcAutoScale();
range = gauge.getRange();
stepSize = NO_OF_LEDS / range;
barBackgroundColor = gauge.getBarBackgroundColor();
barColor = gauge.getBarColor();
sectionsVisible = gauge.getSectionsVisible();
sections = gauge.getSections();
ledSize = PREFERRED_WIDTH * 0.5;
ledSpacer = PREFERRED_WIDTH * 0.05;
ledBorder = PREFERRED_WIDTH * 0.25;
init();
initGraphics();
registerListeners();
}
示例2: SimpleDigitalSkin
import eu.hansolo.medusa.Gauge; //导入方法依赖的package包/类
public SimpleDigitalSkin(Gauge gauge) {
super(gauge);
if (gauge.isAutoScale()) gauge.calcAutoScale();
minValue = gauge.getMinValue();
maxValue = gauge.getMaxValue();
range = gauge.getRange();
angleStep = ANGLE_RANGE / range;
barColor = gauge.getBarColor();
valueColor = gauge.getValueColor();
unitColor = gauge.getUnitColor();
isStartFromZero = gauge.isStartFromZero();
sectionsVisible = gauge.getSectionsVisible();
sections = gauge.getSections();
thresholdVisible = gauge.isThresholdVisible();
thresholdColor = gauge.getThresholdColor();
decimalListener = o -> handleEvents("DECIMALS");
currentValueListener = o -> setBar(gauge.getCurrentValue());
initGraphics();
registerListeners();
setBar(gauge.getCurrentValue());
}
示例3: 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();
}
示例4: 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());
}
示例5: 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());
}
示例6: 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());
}
示例7: BarSkin
import eu.hansolo.medusa.Gauge; //导入方法依赖的package包/类
public BarSkin(Gauge gauge) {
super(gauge);
if (gauge.isAutoScale()) gauge.calcAutoScale();
range = gauge.getRange();
angleStep = -ANGLE_RANGE / range;
currentValueListener = o -> redraw();
barColorListener = o -> {
Color barColor = gauge.getBarColor();
gauge.setGradientBarStops(new Stop(0.0, barColor),
new Stop(0.01, barColor),
new Stop(0.75, barColor.deriveColor(-10, 1, 1, 1)),
new Stop(1.0, barColor.deriveColor(-20, 1, 1, 1)));
resize();
};
titleListener = o -> {
titleText.setText(gauge.getTitle());
resizeTitleText();
};
unitListener = o -> {
unitText.setText(gauge.getUnit());
resizeUnitText();
};
initGraphics();
registerListeners();
}