/** * 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()); }
/** * 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 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()); }
/** * 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()); }
@Override public void setMinimumSize(final Dimension DIM) { int width = DIM.width < 24 ? 24 : DIM.width; int height = DIM.height < 24 ? 24 : DIM.height; final int SIZE = width <= height ? width : height; super.setMinimumSize(new Dimension(SIZE, SIZE)); calcInnerBounds(); init(INNER_BOUNDS.width, INNER_BOUNDS.height); invalidate(); repaint(); }
@Override public void setMaximumSize(final Dimension DIM) { int width = DIM.width > 1080 ? 1080 : DIM.width; int height = DIM.height > 1080 ? 1080 : DIM.height; final int SIZE = width <= height ? width : height; super.setMaximumSize(new Dimension(SIZE, SIZE)); calcInnerBounds(); init(INNER_BOUNDS.width, INNER_BOUNDS.height); invalidate(); repaint(); }
@Override public void setPreferredSize(final Dimension DIM) { final int SIZE = DIM.width <= DIM.height ? DIM.width : DIM.height; super.setPreferredSize(new Dimension(SIZE, SIZE)); calcInnerBounds(); init(INNER_BOUNDS.width, INNER_BOUNDS.height); invalidate(); repaint(); }
@Override public void setMaximumSize(final Dimension DIM) { int width = DIM.width > 1080 ? 1080 : DIM.width; int height = DIM.height > 1080 ? 1080 : DIM.height; final int SIZE = width <= height ? width : height; super.setMaximumSize(new Dimension(SIZE, SIZE)); calcInnerBounds(); init(INNER_BOUNDS.width, INNER_BOUNDS.height); invalidate(); repaint(); }
@Override public void setPreferredSize(final Dimension DIM) { final int SIZE = DIM.width <= DIM.height ? DIM.width : DIM.height; super.setPreferredSize(new Dimension(SIZE, SIZE)); calcInnerBounds(); init(INNER_BOUNDS.width, INNER_BOUNDS.height); invalidate(); repaint(); }
@Override public void setMinimumSize(final Dimension DIM) { int width = DIM.width < 24 ? 24 : DIM.width; int height = DIM.height < 24 ? 24 : DIM.height; final int SIZE = width <= height ? width : height; super.setMinimumSize(new Dimension(SIZE, SIZE)); calcInnerBounds(); init(INNER_BOUNDS.width, INNER_BOUNDS.height); invalidate(); repaint(); }
/** * 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()); }