当前位置: 首页>>代码示例>>Java>>正文


Java Gauge.getValue方法代码示例

本文整理汇总了Java中eu.hansolo.medusa.Gauge.getValue方法的典型用法代码示例。如果您正苦于以下问题:Java Gauge.getValue方法的具体用法?Java Gauge.getValue怎么用?Java Gauge.getValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在eu.hansolo.medusa.Gauge的用法示例。


在下文中一共展示了Gauge.getValue方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
 
开发者ID:HanSolo,项目名称:medusademo,代码行数:27,代码来源:InteractiveGaugeSkin.java

示例2: 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();
}
 
开发者ID:HanSolo,项目名称:Medusa,代码行数:21,代码来源:AmpSkin.java

示例3: 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());
}
 
开发者ID:HanSolo,项目名称:Medusa,代码行数:25,代码来源:TileKpiSkin.java

示例4: 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());
}
 
开发者ID:HanSolo,项目名称:Medusa,代码行数:17,代码来源:KpiSkin.java

示例5: 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();
}
 
开发者ID:HanSolo,项目名称:Medusa,代码行数:23,代码来源:TinySkin.java

示例6: 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());
}
 
开发者ID:HanSolo,项目名称:Medusa,代码行数:26,代码来源:IndicatorSkin.java

示例7: 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();
}
 
开发者ID:HanSolo,项目名称:Medusa,代码行数:32,代码来源:HSkin.java

示例8: 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();
}
 
开发者ID:HanSolo,项目名称:Medusa,代码行数:30,代码来源:QuarterSkin.java

示例9: VSkin

import eu.hansolo.medusa.Gauge; //导入方法依赖的package包/类
public VSkin(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         = event -> handleMouseEvent(event);
    currentValueListener = o -> rotateNeedle(gauge.getCurrentValue());
    markerListener       = c -> {
        updateMarkers();
        redraw();
    };

    updateMarkers();

    initGraphics();
    registerListeners();
}
 
开发者ID:HanSolo,项目名称:Medusa,代码行数:32,代码来源:VSkin.java

示例10: GaugeSkin

import eu.hansolo.medusa.Gauge; //导入方法依赖的package包/类
public GaugeSkin(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);
    currentValueListener = o -> rotateNeedle(gauge.getCurrentValue());
    markerListener       = c -> {
        updateMarkers();
        redraw();
    };
    updateMarkers();

    initGraphics();
    registerListeners();
}
 
开发者ID:HanSolo,项目名称:Medusa,代码行数:32,代码来源:GaugeSkin.java


注:本文中的eu.hansolo.medusa.Gauge.getValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。