Package lu.kbra.modelizer_next.ui.frame
Interface MainFrameStyleController
- All Known Implementing Classes:
MainFrame
public interface MainFrameStyleController
Style and palette actions implemented by the main frame.
-
Method Summary
Modifier and TypeMethodDescriptiondefault JMenuCreates a default style menu.default JMenuItemCreates a reload styles item.default StylePalettefindPaletteByName(String paletteName) Finds the palette by name that matches the supplied input.default ColormixWithWhite(Color color, double amount) Blends the given color with white by the supplied ratio.default voidpopulateStylesMenu(JMenu stylesMenu) Rebuilds the style menu from the available palettes.default voidReloads style palettes and refreshes the related UI controls.default voidSets the default palette to canvases.
-
Method Details
-
createDefaultStyleMenu
Creates a default style menu.- Returns:
- the created default style menu
-
createReloadStylesItem
Creates a reload styles item.- Returns:
- the created reload styles item
-
findPaletteByName
Finds the palette by name that matches the supplied input.- Parameters:
paletteName- name value to use- Returns:
- the matching palette by name, or
nullwhen no match exists
-
mixWithWhite
Blends the given color with white by the supplied ratio.- Parameters:
color- color value to useamount- numeric amount value- Returns:
- the mix with white result
-
populateStylesMenu
Rebuilds the style menu from the available palettes.- Parameters:
stylesMenu- styles menu value used by the operation
-
reloadStyles
default void reloadStyles()Reloads style palettes and refreshes the related UI controls. -
setDefaultPaletteToCanvases
default void setDefaultPaletteToCanvases()Sets the default palette to canvases.
-