Skip to content

Commit

Permalink
FlatLaf: use NetBeans folder icons in NB Explorer component instead o…
Browse files Browse the repository at this point in the history
…f FlatLaf outlined folder icons (e.g. Projects or Files views)
  • Loading branch information
DevCharly committed Apr 7, 2023
1 parent c7847c6 commit cb7ff53
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,8 @@ nb.options.categories.tabPanelForeground = @foreground
nb.options.categories.separatorColor = $Separator.foreground
nb.options.categories.selectionBorderColor = $nb.options.categories.selectionBackground
nb.options.categories.highlightBorderColor = $nb.options.categories.highlightBackground

#---- Tree ----

Tree.closedIcon = org.netbeans.swing.laf.flatlaf.ui.FlatTreeClosedIcon
Tree.openIcon = org.netbeans.swing.laf.flatlaf.ui.FlatTreeOpenIcon
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.netbeans.swing.laf.flatlaf.ui;

import javax.swing.ImageIcon;
import org.openide.util.ImageUtilities;

/**
* "closed" icon for {@link javax.swing.JTree} used by {@link javax.swing.tree.DefaultTreeCellRenderer}.
*
* @author Karl Tauber
*/
public class FlatTreeClosedIcon extends ImageIcon {

public FlatTreeClosedIcon() {
super( ImageUtilities.loadImage( "org/netbeans/swing/plaf/resources/hidpi-folder-closed.png" ) ); // NOI18N
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.netbeans.swing.laf.flatlaf.ui;

import javax.swing.ImageIcon;
import org.openide.util.ImageUtilities;

/**
* "open" icon for {@link javax.swing.JTree} used by {@link javax.swing.tree.DefaultTreeCellRenderer}.
*
* @author Karl Tauber
*/
public class FlatTreeOpenIcon extends ImageIcon {

public FlatTreeOpenIcon() {
super( ImageUtilities.loadImage( "org/netbeans/swing/plaf/resources/hidpi-folder-open.png" ) ); // NOI18N
}
}

0 comments on commit cb7ff53

Please sign in to comment.