javax.swing.Icon



API Populatity

29 Client projects

Project: javax

Package: javax.swing

Project gephi/gephi in file ...oratory.impl.manipulators.nodes.SelectOnGraph.java (2010-06-15)
@@ -20,6 +20,7 @@ along with Gephi.  If not, see <http://www.gnu.org/licenses/>.
  */
 package org.gephi.datalaboratory.impl.manipulators.nodes;
 
+import javax.swing.Icon;
 import org.gephi.datalaboratory.spi.ManipulatorUI;
 import org.gephi.datalaboratory.spi.nodes.NodesManipulator;
 import org.gephi.graph.api.Node;
@@ -64,4 +65,8 @@ public class SelectOnGraph implements NodesManipulator {
     public int getPosition() {
         return 0;
     }
+
+    public Icon getIcon() {
+        return null;
+    }
 }
Project ata4/disunity in file ....disunity.gui.view.ObjectDataTreeCellRenderer.java (2014-12-27)
@@ -9,9 +9,11 @@
  */
 package info.ata4.disunity.gui.view;
 
+import info.ata4.disunity.gui.util.IconUtils;
 import info.ata4.unity.rtti.ObjectData;
 import java.util.HashMap;
 import java.util.Map;
+import javax.swing.Icon;
 import javax.swing.tree.DefaultTreeCellRenderer;
 
 /**
@@ -22,6 +24,8 @@ public class ObjectDataTreeCellRenderer implements DelegateTreeCellRenderer<Obje
     
     private final Map<ObjectData, String> textCache = new HashMap<>();
     
+    private final Icon blockIcon = IconUtils.createIcon("document-block.png");
+    
     @Override
     public Class<ObjectData> getTreeCellType() {
         return ObjectData.class;
@@ -31,6 +35,8 @@ public class ObjectDataTreeCellRenderer implements DelegateTreeCellRenderer<Obje
     public void configureTreeCellRenderer(DefaultTreeCellRenderer renderer,
             ObjectData userData, boolean sel, boolean expanded, boolean leaf,
             int row, boolean hasFocus) {
+        renderer.setIcon(blockIcon);
+        
         // getName() is expensive, cache it
         if (!textCache.containsKey(userData)) {
             textCache.put(userData, userData.getName());
Project gephi/gephi in file ...aboratory.impl.manipulators.edges.DeleteEdges.java (2010-06-15)
@@ -20,10 +20,12 @@ along with Gephi.  If not, see <http://www.gnu.org/licenses/>.
  */
 package org.gephi.datalaboratory.impl.manipulators.edges;
 
+import javax.swing.Icon;
 import org.gephi.datalaboratory.api.GraphElementsController;
 import org.gephi.datalaboratory.spi.ManipulatorUI;
 import org.gephi.datalaboratory.spi.edges.EdgesManipulator;
 import org.gephi.graph.api.Edge;
+import org.openide.util.ImageUtilities;
 import org.openide.util.Lookup;
 import org.openide.util.NbBundle;
 
@@ -71,4 +73,8 @@ public class DeleteEdges implements EdgesManipulator {
     public int getPosition() {
         return 0;
     }
+
+    public Icon getIcon() {
+        return ImageUtilities.loadImageIcon("org/gephi/datalaboratory/impl/manipulators/resources/cross.png", true);
+    }
 }