本文整理汇总了Java中eu.hansolo.medusa.Gauge.SkinType方法的典型用法代码示例。如果您正苦于以下问题:Java Gauge.SkinType方法的具体用法?Java Gauge.SkinType怎么用?Java Gauge.SkinType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eu.hansolo.medusa.Gauge
的用法示例。
在下文中一共展示了Gauge.SkinType方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: changeSkin
import eu.hansolo.medusa.Gauge; //导入方法依赖的package包/类
@Override
protected void changeSkin ( final Gauge.SkinType skinType ) {
super.changeSkin(skinType);
jfx_node.setAreaIconsVisible(false);
jfx_node.setAreaTextVisible(false);
jfx_node.setAreas(createAreas());
jfx_node.setAreasVisible(false);
jfx_node.setBarColor(JFXUtil.convert(model_widget.propBarColor().getValue()));
jfx_node.setBarEffectEnabled(!model_widget.propFlatBar().getValue());
jfx_node.setHighlightSections(zonesHighlight);
jfx_node.setOrientation(Orientation.valueOf(orientation.name()));
jfx_node.setTickLabelLocation(TickLabelLocation.INSIDE);
}
示例2: createJFXNode
import eu.hansolo.medusa.Gauge; //导入方法依赖的package包/类
protected Gauge createJFXNode ( Gauge.SkinType skin ) throws Exception {
return GaugeBuilder.create()
.skinType(skin)
.prefHeight(model_widget.propHeight().getValue())
.prefWidth(model_widget.propWidth().getValue())
//--------------------------------------------------------
// Previous properties must be set first.
//--------------------------------------------------------
.animated(false)
.checkAreasForValue(false)
.checkSectionsForValue(false)
.checkThreshold(false)
.highlightAreas(false)
.innerShadowEnabled(false)
.interactive(false)
.ledVisible(false)
.returnToZero(false)
.sectionIconsVisible(false)
.sectionTextVisible(false)
.build();
}
示例3: getSkin
import eu.hansolo.medusa.Gauge; //导入方法依赖的package包/类
@Override
protected Gauge.SkinType getSkin() {
Gauge.SkinType skinType;
switch ( skin ) {
case THREE_QUARTERS:
skinType = Gauge.SkinType.GAUGE;
break;
default:
skinType = Gauge.SkinType.valueOf(skin.name());
break;
}
return skinType;
}
示例4: changeSkin
import eu.hansolo.medusa.Gauge; //导入方法依赖的package包/类
/**
* Change the skin type, resetting some of the gauge parameters.
*
* @param skinType The new skin to be set.
*/
protected void changeSkin ( final Gauge.SkinType skinType ) {
jfx_node.setSkinType(skinType);
jfx_node.setPrefWidth(model_widget.propWidth().getValue());
jfx_node.setPrefHeight(model_widget.propHeight().getValue());
Color fgColor = JFXUtil.convert(model_widget.propForegroundColor().getValue());
jfx_node.setAnimated(false);
jfx_node.setAutoScale(model_widget.propAutoScale().getValue());
jfx_node.setBackgroundPaint(model_widget.propTransparent().getValue() ? Color.TRANSPARENT : JFXUtil.convert(model_widget.propBackgroundColor().getValue()));
jfx_node.setCheckAreasForValue(false);
jfx_node.setCheckSectionsForValue(false);
jfx_node.setCheckThreshold(false);
jfx_node.setDecimals(FormatOptionHandler.actualPrecision(model_widget.runtimePropValue().getValue(), model_widget.propPrecision().getValue()));
jfx_node.setHighlightAreas(false);
jfx_node.setInnerShadowEnabled(false);
jfx_node.setInteractive(false);
jfx_node.setLedVisible(false);
jfx_node.setMajorTickMarkColor(fgColor);
jfx_node.setMajorTickSpace(model_widget.propMajorTickSpace().getValue());
jfx_node.setMediumTickMarkColor(fgColor);
jfx_node.setMinorTickMarkColor(fgColor);
jfx_node.setMinorTickSpace(model_widget.propMinorTickSpace().getValue());
jfx_node.setReturnToZero(false);
jfx_node.setSectionIconsVisible(false);
jfx_node.setSectionTextVisible(false);
jfx_node.setTickLabelColor(fgColor);
jfx_node.setTickMarkColor(fgColor);
jfx_node.setTitle(model_widget.propTitle().getValue());
jfx_node.setTitleColor(fgColor);
jfx_node.setUnit(model_widget.propUnit().getValue());
jfx_node.setUnitColor(fgColor);
jfx_node.setValueColor(fgColor);
jfx_node.setValueVisible(model_widget.propValueVisible().getValue());
jfx_node.setZeroColor(fgColor);
}
示例5: changeSkin
import eu.hansolo.medusa.Gauge; //导入方法依赖的package包/类
@Override
protected void changeSkin ( final Gauge.SkinType skinType ) {
super.changeSkin(skinType);
jfx_node.setLcdDesign(LcdDesign.valueOf(model_widget.propLcdDesign().getValue().name()));
jfx_node.setLcdFont(LcdFont.valueOf(model_widget.propLcdFont().getValue().name()));
jfx_node.setLcdVisible(model_widget.propLcdVisible().getValue());
jfx_node.setNeedleBehavior(Gauge.NeedleBehavior.STANDARD);
}
示例6: changeSkin
import eu.hansolo.medusa.Gauge; //导入方法依赖的package包/类
@Override
protected void changeSkin ( final Gauge.SkinType skinType ) {
super.changeSkin(skinType);
jfx_node.setBarBackgroundColor(JFXUtil.convert(model_widget.propBarBackgroundColor().getValue()));
jfx_node.setBarColor(JFXUtil.convert(model_widget.propBarColor().getValue()));
jfx_node.setHighlightSections(false);
jfx_node.setStartFromZero(model_widget.propStartFromZero().getValue());
jfx_node.setTickLabelColor(Color.WHITE);
}
示例7: getSkin
import eu.hansolo.medusa.Gauge; //导入方法依赖的package包/类
@Override
protected Gauge.SkinType getSkin() {
return Gauge.SkinType.LINEAR;
}
示例8: changeSkin
import eu.hansolo.medusa.Gauge; //导入方法依赖的package包/类
@Override
protected void changeSkin ( final Gauge.SkinType skinType ) {
super.changeSkin(skinType);
jfx_node.setAverageColor(JFXUtil.convert(model_widget.propAverageColor().getValue()));
jfx_node.setAverageVisible(model_widget.propAverage().getValue());
jfx_node.setAveragingEnabled(model_widget.propAverage().getValue());
jfx_node.setAveragingPeriod(model_widget.propAverageSamples().getValue());
jfx_node.setHighlightSections(zonesHighlight);
jfx_node.setKnobColor(JFXUtil.convert(model_widget.propKnobColor().getValue()));
jfx_node.setKnobPosition(Pos.valueOf(knobPosition.name()));
jfx_node.setKnobType(KnobType.STANDARD);
jfx_node.setKnobVisible(true);
jfx_node.setMajorTickMarkLengthFactor(0.515);
jfx_node.setMajorTickMarkType(TickMarkType.LINE);
jfx_node.setMajorTickMarksVisible(model_widget.propMajorTickVisible().getValue());
jfx_node.setMediumTickMarkLengthFactor(0.475);
jfx_node.setMediumTickMarkType(TickMarkType.LINE);
jfx_node.setMediumTickMarksVisible(model_widget.propMediumTickVisible().getValue());
jfx_node.setMinorTickMarkType(TickMarkType.LINE);
jfx_node.setMinorTickMarksVisible(model_widget.propMinorTickVisible().getValue());
jfx_node.setNeedleBorderColor(JFXUtil.convert(model_widget.propNeedleColor().getValue()).darker());
jfx_node.setNeedleColor(JFXUtil.convert(model_widget.propNeedleColor().getValue()));
jfx_node.setNeedleShape(NeedleShape.ANGLED);
jfx_node.setNeedleSize(NeedleSize.THIN);
jfx_node.setNeedleType(NeedleType.STANDARD);
jfx_node.setOnlyFirstAndLastTickLabelVisible(model_widget.propOnlyExtremaVisible().getValue());
jfx_node.setScaleDirection(ScaleDirection.valueOf(model_widget.propScaleDirection().getValue().name()));
jfx_node.setShadowsEnabled(true);
jfx_node.setThresholdVisible(false);
jfx_node.setTickLabelDecimals(model_widget.propTickLabelDecimals().getValue());
jfx_node.setTickLabelsVisible(model_widget.propTickLabelsVisible().getValue());
jfx_node.setTickMarkRingVisible(model_widget.propTickMarkRingVisible().getValue());
switch ( skin ) {
case HORIZONTAL:
knobPosition = MeterWidget.KnobPosition.BOTTOM_CENTER;
break;
case QUARTER:
knobPosition = MeterWidget.KnobPosition.BOTTOM_RIGHT;
break;
case THREE_QUARTERS:
knobPosition = MeterWidget.KnobPosition.CENTER;
jfx_node.setAngleRange(270);
jfx_node.setStartAngle(0);
break;
case VERTICAL:
knobPosition = MeterWidget.KnobPosition.CENTER_RIGHT;
break;
case GAUGE:
knobPosition = MeterWidget.KnobPosition.CENTER;
switch ( model_widget.propScaleDirection().getValue() ) {
case CLOCKWISE:
jfx_node.setStartAngle(320);
break;
case COUNTER_CLOCKWISE:
jfx_node.setStartAngle(40);
break;
}
break;
default:
knobPosition = MeterWidget.KnobPosition.CENTER;
break;
}
model_widget.propKnobPosition().setValue(knobPosition);
jfx_node.setKnobPosition(Pos.valueOf(knobPosition.name()));
}
示例9: getSkin
import eu.hansolo.medusa.Gauge; //导入方法依赖的package包/类
@Override
protected Gauge.SkinType getSkin() {
return Gauge.SkinType.valueOf(model_widget.propSkin().getValue().name());
}
示例10: getSkin
import eu.hansolo.medusa.Gauge; //导入方法依赖的package包/类
protected abstract Gauge.SkinType getSkin();