Comments (4)
For 2) look at SubstanceCortex..setFlatBackground
Everything you used to do with putClientProperty has been centralized in SubstanceCortex which imo is a much cleaner API.
from substance.
I'm not seeing the tree selection issue in the main Substance demo app. This maybe is a custom tree since it has checkboxes?
Can you attach a small, standalone sample app that reproduces this issue under 8.0.01 build?
As for the client properties, they have all been replaced by various scoped APIs in SubstanceCortex as pointed above. Some of them are still implemented internally by client properties, but that is an implementation detail and should not be relied on going forward.
from substance.
Thanks for your prompt reply. For 2), I just replaced by button.putClientProperty("substancelaf.internal.FlatLook", Boolean.TRUE);
I can reproduce the issue with a simple JTree. The problem is related to DefaultTreeCellRenderer:
import javax.swing.JFrame;
import javax.swing.JTree;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeCellRenderer;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.TreePath;
public class TreeExample extends JFrame {
public TreeExample() {
try {
UIManager.setLookAndFeel("org.pushingpixels.substance.api.skin.SubstanceRavenLookAndFeel");
} catch (Exception e) {
e.printStackTrace();
}
JTree tree = new JTree();
DefaultMutableTreeNode root = new DefaultMutableTreeNode("Root");
DefaultMutableTreeNode vegetableNode = new DefaultMutableTreeNode("Vegetables");
vegetableNode.add(new DefaultMutableTreeNode("Capsicum"));
vegetableNode.add(new DefaultMutableTreeNode("Carrot"));
vegetableNode.add(new DefaultMutableTreeNode("Tomato"));
vegetableNode.add(new DefaultMutableTreeNode("Potato"));
DefaultMutableTreeNode fruitNode = new DefaultMutableTreeNode("Fruits");
fruitNode.add(new DefaultMutableTreeNode("Banana"));
fruitNode.add(new DefaultMutableTreeNode("Mango"));
fruitNode.add(new DefaultMutableTreeNode("Apple"));
fruitNode.add(new DefaultMutableTreeNode("Grapes"));
fruitNode.add(new DefaultMutableTreeNode("Orange"));
root.add(vegetableNode);
root.add(fruitNode);
DefaultTreeModel model = new DefaultTreeModel(root, false);
tree.setModel(model);
DefaultTreeCellRenderer renderer = new DefaultTreeCellRenderer();
renderer.setOpenIcon(null);
renderer.setClosedIcon(null);
renderer.setLeafIcon(null);
tree.setCellRenderer(renderer);
tree.expandPath(new TreePath(vegetableNode.getPath()));
tree.expandPath(new TreePath(fruitNode.getPath()));
add(tree);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setTitle("JTree Example");
this.pack();
this.setVisible(true);
}
public static void main(String[] args) throws Exception {
SwingUtilities.invokeLater(TreeExample::new);
}
}
from substance.
The tree renderer is due to "Tree.rendererFillBackground" -> false entry getting added to the UIManager defaults table. This is not needed. Will remove tonight for 8.0.02.
from substance.
Related Issues (20)
- Writing Japanese text fails when using Substance HOT 2
- Issue with the tree cell render which must be object of default cell render rather than the treecell. HOT 4
- SubstanceTableHeaderUI not being able to find draggedColumn HOT 9
- isFocusTraversable() has been deprecated
- Switching from Substance to another L&F causes IllegalArgumentException HOT 11
- Windows maximize when dragged to top HOT 1
- Maximize bug on secondary screen when screen resolutions differ HOT 4
- NullPointerException for Business L&F under Java 9 HOT 4
- Possible to change scroll bar style? HOT 1
- Move to Java 9 for compile / runtime HOT 1
- Support for "inverse flat" look of title pane control buttons HOT 1
- Slow performance HOT 4
- How to apply custom FontSets? HOT 2
- Using the same border for JTextField and JTextArea/JScrollPane? HOT 2
- Not possible to change alpha value for color with color picker HOT 4
- JitPack deployment HOT 4
- NullPointerException in CheckBoxMenuItemIcon.getIconWidth() HOT 5
- Migration guide to v8 HOT 2
- Colorize SVG icons on skin change HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from substance.