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

IncludeExcludeVisualizer (Java Project Support) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.java.project/1 1.12

org.netbeans.spi.java.project.support.ui
Class IncludeExcludeVisualizer

java.lang.Object
  extended by org.netbeans.spi.java.project.support.ui.IncludeExcludeVisualizer

public class IncludeExcludeVisualizer
extends Object

Utility permitting a user to easily see the effect of changing include and exclude patterns on a source group (or several). Intended for use in project creation wizards and project properties dialogs. The exact appearance of the panel is not specified but it should permit the user to see, and edit, the current set of includes and excludes; and display the set of files included and excluded by the current pattern.

Since:
org.netbeans.modules.java.project/1 1.12
See Also:
PathMatcher

Constructor Summary
IncludeExcludeVisualizer()
          Create a new visualizer.
 
Method Summary
 void addChangeListener(ChangeListener l)
          Add a listener to changes made by the user in the includes or excludes.
 String getExcludePattern()
          Get the current exclude pattern.
 String getIncludePattern()
          Get the current include pattern.
 JComponent getVisualizerPanel()
          Get the associated visual panel.
 void removeChangeListener(ChangeListener l)
          Remove a change listener.
 void setExcludePattern(String pattern)
          Set the exclude pattern.
 void setIncludePattern(String pattern)
          Set the include pattern.
 void setRoots(File[] roots)
          Configure a set of root directories to which the includes and excludes apply.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IncludeExcludeVisualizer

public IncludeExcludeVisualizer()
Create a new visualizer. Initially has no roots and includes anything (equivalent to an include pattern of ** and an empty exclude pattern).

Method Detail

setRoots

public void setRoots(File[] roots)
              throws IllegalArgumentException
Configure a set of root directories to which the includes and excludes apply.

Parameters:
roots - a set of root directories to search
Throws:
IllegalArgumentException - if roots contains a non-directory

getIncludePattern

public String getIncludePattern()
Get the current include pattern.

Returns:
the current pattern (never null)

setIncludePattern

public void setIncludePattern(String pattern)
Set the include pattern. This does not fire a change event.

Parameters:
pattern - the new pattern (never null)

getExcludePattern

public String getExcludePattern()
Get the current exclude pattern.

Returns:
the current pattern (never null)

setExcludePattern

public void setExcludePattern(String pattern)
Set the exclude pattern. This does not fire a change event.

Parameters:
pattern - the new pattern (never null)

addChangeListener

public void addChangeListener(ChangeListener l)
Add a listener to changes made by the user in the includes or excludes.

Parameters:
l - the listener

removeChangeListener

public void removeChangeListener(ChangeListener l)
Remove a change listener.

Parameters:
l - the listener

getVisualizerPanel

public JComponent getVisualizerPanel()
Get the associated visual panel.

Returns:
a panel displaying this include and exclude information
Throws:
IllegalThreadStateException - if not called in the event thread

org.netbeans.modules.java.project/1 1.12

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