Skip to content
This repository has been archived by the owner on Jul 10, 2018. It is now read-only.

Migration guide to v8 #90

Closed
IvanRF opened this issue May 13, 2018 · 2 comments
Closed

Migration guide to v8 #90

IvanRF opened this issue May 13, 2018 · 2 comments

Comments

@IvanRF
Copy link
Contributor

IvanRF commented May 13, 2018

There are many changes that are straightforward and easy to find in the new code. However, it took me some time to find old constants that now have new names.

It would be nice to start a Migration guide in the docs with some general changes or tips. For example:

Before 8.0 Starting with 8.0
SubstanceLookAndFeel.FLAT_PROPERTY SubstanceSynapse.FLAT_LOOK
comp.putClientProperty(SubstanceLookAndFeel.FLAT_PROPERTY, Boolean.TRUE) SubstanceCortex.ComponentOrParentScope.setFlatBackground(comp, true)
SubstanceLookAndFeel.WINDOW_MODIFIED SubstanceSynapse.CONTENTS_MODIFIED
getRootPane().putClientProperty(SubstanceLookAndFeel.WINDOW_MODIFIED, modified) SubstanceCortex.RootPaneScope.setContentsModified(getRootPane(), modified)
LafWidget.TEXT_EDIT_CONTEXT_MENU SubstanceSynapse.TEXT_EDIT_CONTEXT_MENU
JComponent.putClientProperty(LafWidget.TEXT_EDIT_CONTEXT_MENU, Boolean.TRUE) SubstanceCortex.GlobalScope.setTextEditContextMenuPresence(true)
SubstanceLookAndFeel.setDecorationType(panel, DecorationAreaType.GENERAL) SubstanceCortex.ComponentOrParentChainScope.setDecorationType.setDecorationType(panel, DecorationAreaType.GENERAL)
UIManager.put(SubstanceLookAndFeel.SHOW_EXTRA_WIDGETS, Boolean.TRUE) SubstanceCortex.GlobalScope.setExtraWidgetsPresence(true)
SubstanceLookAndFeel functions like setSkin, getCurrentSkin, registerSkinChangeListener, setFontPolicy, etc. All these functions are in SubstanceCortex.GlobalScope class
@kirill-grouchnikov
Copy link
Owner

DecorationPainterUtils is an internal class.

SubstanceCortex is the main entry point to customize Substance behavior, along with additional APIs in org.pushingpixels.substance.api and its subpackages.

At the present moment the consolidation of older APIs under the SubstanceCortex roof is the new world, and a complete migration guide beyond this will not happen.

@IvanRF
Copy link
Contributor Author

IvanRF commented May 14, 2018

DecorationPainterUtils is an internal class.

Sorry, I just saw the correct function: SubstanceCortex.ComponentOrParentChainScope.setDecorationType.

At the present moment the consolidation of older APIs under the SubstanceCortex roof is the new world

OK, I like that, now that I think about it everything I used is in that class, it will make the transition easier.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants