Lucas Friedmann created NETBEANS-4173:
-----------------------------------------
Summary: [FlatLaF] Partial render selected BeanTreeView element
Key: NETBEANS-4173
URL: https://issues.apache.org/jira/browse/NETBEANS-4173
Project: NetBeans
Issue Type: Bug
Components: FlatLaf
Affects Versions: 11.2
Reporter: Lucas Friedmann
Attachments: image.png
!image.png|thumbnail!
Example code
{code}
import com.formdev.flatlaf.FlatLightLaf;
import org.openide.explorer.ExplorerManager;
import org.openide.explorer.view.BeanTreeView;
import org.openide.nodes.AbstractNode;
import org.openide.nodes.Children;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
public class SampleFrame extends JFrame implements ExplorerManager.Provider {
private final ExplorerManager explorerManager = new ExplorerManager();
public SampleFrame() throws HeadlessException {
setSize(300, 400);
explorerManager.setRootContext(new SampleNode());
BeanTreeView beanTreeView = new BeanTreeView();
getContentPane().add(beanTreeView, BorderLayout.CENTER);
}
@Override
public ExplorerManager getExplorerManager() {
return explorerManager;
}
private static class SampleNode extends AbstractNode {
public SampleNode() {
super(Children.LEAF);
setName("SampleNode");
}
@Override
public Action[] getActions(boolean context) {
AbstractAction action = new AbstractAction() {
@Override
public void actionPerformed(ActionEvent e) {
}
};
action.putValue(Action.NAME, "Sample");
return new Action[]{action};
}
}
public static void main(String[] args) {
SwingUtilities.invokeLater(() -> {
FlatLightLaf.install();
SampleFrame frame = new SampleFrame();
frame.setDefaultCloseOperation(EXIT_ON_CLOSE);
frame.setVisible(true);
});
}
}
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists