public Altimeter() { super(); init(getInnerBounds().width, getInnerBounds().height); setMinValue(0); setMaxValue(10); calcAngleStep(); setLcdColor(LcdColor.BLACK_LCD); setLcdVisible(true); setTitle("ALT"); setUnitString("ft"); } // </editor-fold>
/** * Sets the current height in feet * @param VALUE */ @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 AbstractGauge init(final int WIDTH, final int HEIGHT) { final int GAUGE_WIDTH = isFrameVisible() ? WIDTH : getGaugeBounds().width; final int GAUGE_HEIGHT = isFrameVisible() ? HEIGHT : getGaugeBounds().height; if (GAUGE_WIDTH <= 1 || GAUGE_HEIGHT <= 1) { return this; if (!isFrameVisible()) { setFramelessOffset(-getGaugeBounds().width * 0.0841121495, -getGaugeBounds().width * 0.0841121495); } else { setFramelessOffset(getGaugeBounds().x, getGaugeBounds().y); if (isDigitalFont()) { setLcdValueFont(getModel().getDigitalBaseFont().deriveFont(0.7f * GAUGE_WIDTH * 0.10f)); } else { setLcdValueFont(getModel().getStandardBaseFont().deriveFont(0.625f * GAUGE_WIDTH * 0.10f)); if (isCustomLcdUnitFontEnabled()) { setLcdUnitFont(getCustomLcdUnitFont().deriveFont(0.25f * GAUGE_WIDTH * 0.10f)); } else { setLcdUnitFont(getModel().getStandardBaseFont().deriveFont(0.25f * GAUGE_WIDTH * 0.10f)); setLcdInfoFont(getModel().getStandardInfoFont().deriveFont(0.15f * GAUGE_WIDTH * 0.10f)); if (isFrameVisible()) { switch (getFrameType()) { case ROUND: FRAME_FACTORY.createRadialFrame(GAUGE_WIDTH, getFrameDesign(), getCustomFrameDesign(), getFrameEffect(), bImage); break; case SQUARE:
@Override public AbstractGauge init(final int WIDTH, final int HEIGHT) { final int GAUGE_WIDTH = isFrameVisible() ? WIDTH : getGaugeBounds().width; final int GAUGE_HEIGHT = isFrameVisible() ? HEIGHT : getGaugeBounds().height; if (GAUGE_WIDTH <= 1 || GAUGE_HEIGHT <= 1) { return this; if (!isFrameVisible()) { setFramelessOffset(-getGaugeBounds().width * 0.0841121495, -getGaugeBounds().width * 0.0841121495); } else { setFramelessOffset(getGaugeBounds().x, getGaugeBounds().y); if (isDigitalFont()) { setLcdValueFont(getModel().getDigitalBaseFont().deriveFont(0.7f * GAUGE_WIDTH * 0.10f)); } else { setLcdValueFont(getModel().getStandardBaseFont().deriveFont(0.625f * GAUGE_WIDTH * 0.10f)); if (isCustomLcdUnitFontEnabled()) { setLcdUnitFont(getCustomLcdUnitFont().deriveFont(0.25f * GAUGE_WIDTH * 0.10f)); } else { setLcdUnitFont(getModel().getStandardBaseFont().deriveFont(0.25f * GAUGE_WIDTH * 0.10f)); setLcdInfoFont(getModel().getStandardInfoFont().deriveFont(0.15f * GAUGE_WIDTH * 0.10f)); if (isFrameVisible()) { switch (getFrameType()) { case ROUND: FRAME_FACTORY.createRadialFrame(GAUGE_WIDTH, getFrameDesign(), getCustomFrameDesign(), getFrameEffect(), bImage); break; case SQUARE:
public Altimeter() { super(); init(getInnerBounds().width, getInnerBounds().height); setMinValue(0); setMaxValue(10); calcAngleStep(); setLcdColor(LcdColor.BLACK_LCD); setLcdVisible(true); setTitle("ALT"); setUnitString("ft"); } // </editor-fold>
/** * Sets the current height in feet * @param VALUE */ @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(); } }