站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

UiUtils (Java Source) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.java.source 0.13.0 1

org.netbeans.api.java.source
Class UiUtils

java.lang.Object
  extended by org.netbeans.api.java.source.UiUtils

public final class UiUtils
extends Object

This class contains various methods bound to visualization of Java model elements. It was formerly included under SourceUtils XXX - needs cleanup


Nested Class Summary
static class UiUtils.PrintPart
           
 
Method Summary
static Icon getDeclarationIcon(Element element)
          Deprecated. 
static int getDistance(String s, String t)
          Computes dostance between strings
static Icon getElementIcon(ElementKind elementKind, Collection<Modifier> modifiers)
          Gets correct icon for given ElementKind.
static String getHeader(Element element, CompilationInfo info, String formatString)
          example of formatString: "method " + PrintPart.NAME + PrintPart.PARAMETERS + " has return type " + PrintPart.TYPE
static String getHeader(TreePath treePath, CompilationInfo info, String formatString)
          example of formatString: "method " + PrintPart.NAME + PrintPart.PARAMETERS + " has return type " + PrintPart.TYPE
static boolean open(ClasspathInfo cpInfo, Element el)
          Opens given Element.
static boolean open(FileObject toSearch, ElementHandle<? extends Element> toOpen)
           
static boolean open(FileObject fo, int offset)
          Deprecated. 
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getElementIcon

public static Icon getElementIcon(ElementKind elementKind,
                                  Collection<Modifier> modifiers)
Gets correct icon for given ElementKind.

Parameters:
modifiers - Can be null for empty modifiers collection

getDeclarationIcon

@Deprecated
public static Icon getDeclarationIcon(Element element)
Deprecated. 


open

public static boolean open(ClasspathInfo cpInfo,
                           Element el)
Opens given Element.

Parameters:
cpInfo - fileobject whose ClasspathInfo will be used
el - declaration to open
Returns:
true if and only if the declaration was correctly opened, false otherwise

open

public static boolean open(FileObject toSearch,
                           ElementHandle<? extends Element> toOpen)

getHeader

public static String getHeader(TreePath treePath,
                               CompilationInfo info,
                               String formatString)
example of formatString: "method " + PrintPart.NAME + PrintPart.PARAMETERS + " has return type " + PrintPart.TYPE


getHeader

public static String getHeader(Element element,
                               CompilationInfo info,
                               String formatString)
example of formatString: "method " + PrintPart.NAME + PrintPart.PARAMETERS + " has return type " + PrintPart.TYPE


open

@Deprecated
public static boolean open(FileObject fo,
                                      int offset)
Deprecated. 

Opens given Element.

Parameters:
fo - fileobject whose ClasspathInfo will be used
offset - offset with fileobject
Returns:
true if and only if the declaration was correctly opened, false otherwise

getDistance

public static int getDistance(String s,
                              String t)
Computes dostance between strings


org.netbeans.modules.java.source 0.13.0 1

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.