private Color get( Color active, Color inactive, Color disabled ){ return Colors.between( active, current[ACTIVE_STATE], inactive, current[INACTIVE_STATE], disabled, current[DISABLED_STATE] ); } }
private Color get( Color active, Color inactive, Color disabled ){ return Colors.between( active, current[ACTIVE_STATE], inactive, current[INACTIVE_STATE], disabled, current[DISABLED_STATE] ); } }
public static Color middle( Color a, Color b ){ return between( a, b, 0.5 ); }
g.setColor( Colors.between( lineColor, getBackground(), 0.75 ) );
/** * Updates the foreground color. */ protected void updateForegroundColor(){ boolean done = false; if( changer != null && current != null ){ int duration = getDuration(); if( (isActive() && current[ACTIVE_STATE] != duration) || (!isActive() && current[ACTIVE_STATE] != 0 )){ double ratio = current[ACTIVE_STATE] / (double)duration; setForeground( Colors.between( getInactiveTextColor(), getActiveTextColor(), ratio )); done = true; } if( !done ){ if( isActive() ){ setForeground( getActiveTextColor() ); } else{ setForeground( getInactiveTextColor() ); } } } }