Class LayerVisibilityModel
java.lang.Object
com.arbergashi.charts.ui.legend.LayerVisibilityModel
Holds per-series visibility state.
This model is intentionally lightweight and thread-safe. Swing users typically
interact with it on the EDT, but renderers and overlays may consult it during paint.
Series ids usually come from BaseRenderer#getId().
- Since:
- 2025-06-01
- Version:
- 1.0.0
- Author:
- Arber Gashi
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears all overrides (all series visible by default).voidClears solo mode.booleanReturns true when the series should be dimmed due to solo mode.booleanReturns true when solo mode is active.booleanReturns whether the series is considered visible (default:true).voidSets the series as solo (others remain visible but can be dimmed).voidsetVisible(String seriesId, boolean visible) Sets the series visibility.booleanToggles visibility and returns the new state.
-
Constructor Details
-
LayerVisibilityModel
public LayerVisibilityModel()
-
-
Method Details
-
isVisible
Returns whether the series is considered visible (default:true). -
setVisible
Sets the series visibility. -
toggle
Toggles visibility and returns the new state. -
clear
public void clear()Clears all overrides (all series visible by default). -
setSolo
Sets the series as solo (others remain visible but can be dimmed). -
clearSolo
public void clearSolo()Clears solo mode. -
isSoloActive
public boolean isSoloActive()Returns true when solo mode is active. -
isDimmed
Returns true when the series should be dimmed due to solo mode.
-