/** * Sets the glow color of the lightbulb * @param GLOW_COLOR */ public void setGlowColor(final Color GLOW_COLOR) { glowColor = GLOW_COLOR; init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
/** * Sets the glow color of the lightbulb * @param GLOW_COLOR */ public void setGlowColor(final Color GLOW_COLOR) { glowColor = GLOW_COLOR; init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
/** * Enables/disables the glowing of the lightbulb * @param ON */ public void setOn(final boolean ON) { boolean oldState = on; on = ON; propertySupport.firePropertyChange(STATE_PROPERTY, oldState, on); repaint(getInnerBounds()); }
/** * Sets the alpha value of the glow effect. A value of 0.0f makes * the glow completly invisible and the bulb will look like switched off * @param ALPHA */ public void setAlpha(final float ALPHA) { alpha = ALPHA < 0 ? 0 : (ALPHA > 1 ? 1: ALPHA); repaint(getInnerBounds()); }
/** * Enables/disables the glowing of the lightbulb * @param ON */ public void setOn(final boolean ON) { boolean oldState = on; on = ON; propertySupport.firePropertyChange(STATE_PROPERTY, oldState, on); repaint(getInnerBounds()); }
/** * Sets the alpha value of the glow effect. A value of 0.0f makes * the glow completly invisible and the bulb will look like switched off * @param ALPHA */ public void setAlpha(final float ALPHA) { alpha = ALPHA < 0 ? 0 : (ALPHA > 1 ? 1: ALPHA); repaint(getInnerBounds()); }
/** * Sets the direction of the lightbulb. Use the constants defined in SwingUtilities * SwingUtilities.NORTH * SwingUtilities.EAST * SwingUtiltites.SOUTH * SwingUtilities.WEST * @param DIRECTION */ public void setDirection(final int DIRECTION) { switch (DIRECTION) { case SwingUtilities.SOUTH: direction = SwingUtilities.SOUTH; break; case SwingUtilities.EAST: direction = SwingUtilities.EAST; break; case SwingUtilities.WEST: direction = SwingUtilities.WEST; break; case SwingUtilities.NORTH: default: direction = SwingUtilities.NORTH; break; } repaint(getInnerBounds()); }
G2.translate(getInnerBounds().x, getInnerBounds().y);
G2.translate(getInnerBounds().x, getInnerBounds().y);
/** * Sets the direction of the lightbulb. Use the constants defined in SwingUtilities * SwingUtilities.NORTH * SwingUtilities.EAST * SwingUtiltites.SOUTH * SwingUtilities.WEST * @param DIRECTION */ public void setDirection(final int DIRECTION) { switch (DIRECTION) { case SwingUtilities.SOUTH: direction = SwingUtilities.SOUTH; break; case SwingUtilities.EAST: direction = SwingUtilities.EAST; break; case SwingUtilities.WEST: direction = SwingUtilities.WEST; break; case SwingUtilities.NORTH: default: direction = SwingUtilities.NORTH; break; } repaint(getInnerBounds()); }