Class SchemePreview
java.lang.Object
com.iizigo.panel.SchemePreview
The theme preview of a Panel Editor (THEME-DESIGN section 5, phase B3): beside the saved theme choice - the family and the mode the "Theme and Client" menu stores in the preference store - an editor can preview the panel in any shipped family and mode without changing the saved choice. The preview is per editor, never stored, and cleared by choosing the saved theme again or by a change of the saved choice.
- Author:
- Christopher Mindus
Constructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionbooleanClears the preview: the saved choice shows again.Gets the scheme the editor shows: the preview when set, the saved choice otherwise.Gets the preview.booleanChecks if a preview is set.booleanisPreviewing(UISchemes.Family family, UISchemes.Mode mode) Checks if a family and mode is the preview shown.booleanCalled when the saved choice changed: the preview ends, so the editor shows the new saved choice at once (the owner's ruling Q-1, 2026-09-28).booleanset(UISchemes.Family family, UISchemes.Mode mode, String savedFamily, String savedMode) Sets the preview.
Constructor Details
SchemePreview
public SchemePreview()Creates the preview: none.
Method Details
set
public boolean set(UISchemes.Family family, UISchemes.Mode mode, String savedFamily, String savedMode) Sets the preview.- Parameters:
family- The family, or null to clear the preview.mode- The mode: light or dark; auto previews as light, since the Designer has no OS preference to follow.savedFamily- The saved family name, for the change report.savedMode- The saved mode name, for the change report.- Returns:
- true when the effective scheme changed.
clear
savedChoiceChanged
public boolean savedChoiceChanged()Called when the saved choice changed: the preview ends, so the editor shows the new saved choice at once (the owner's ruling Q-1, 2026-09-28).- Returns:
- true when a preview was ended.
isPreviewing
public boolean isPreviewing()Checks if a preview is set.- Returns:
- true when a preview is shown instead of the saved choice.
getPreview
Gets the preview.- Returns:
- The preview, or null for the saved choice.
isPreviewing
Checks if a family and mode is the preview shown.- Parameters:
family- The family.mode- The mode.- Returns:
- true when that family and mode is previewed.
effective