public class PathEditor
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected static class |
PathEditor.PathCellRenderer |
Modifier and Type | Field and Description |
---|---|
static java.awt.Color |
INVALID_COLOR |
protected boolean |
myEnabled |
protected javax.swing.JPanel |
myPanel |
Constructor and Description |
---|
PathEditor(FileChooserDescriptor descriptor) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
addElement(VirtualFile item)
Method adds element only if it is not added yet.
|
void |
addPaths(VirtualFile... paths) |
protected void |
addToolbarButtons(ToolbarDecorator toolbarDecorator) |
protected VirtualFile[] |
adjustAddedFileSet(java.awt.Component component,
VirtualFile[] files)
Implement this method to adjust adding behavior, this method is called right after the files
or directories are selected for added.
|
void |
clearList() |
javax.swing.JComponent |
createComponent() |
protected javax.swing.ListCellRenderer<VirtualFile> |
createListCellRenderer(JBList<VirtualFile> list) |
protected javax.swing.DefaultListModel<VirtualFile> |
createListModel() |
protected VirtualFile[] |
doAddItems() |
protected void |
doRemoveItems(int[] indices,
javax.swing.JList<VirtualFile> list) |
protected javax.swing.DefaultListModel<VirtualFile> |
getListModel() |
VirtualFile[] |
getRoots() |
protected int |
getRowCount() |
protected VirtualFile[] |
getSelectedRoots() |
protected VirtualFile |
getValueAt(int row) |
boolean |
isModified() |
protected boolean |
isRemoveActionEnabled(VirtualFile[] files) |
protected boolean |
isUrlInserted() |
protected void |
itemsRemoved(java.util.List<VirtualFile> removedItems) |
void |
removePaths(VirtualFile... paths) |
protected void |
requestDefaultFocus() |
void |
resetPath(java.util.List<? extends VirtualFile> paths) |
void |
setAddBaseDir(VirtualFile addBaseDir) |
protected void |
setEnabled(boolean enabled) |
protected void |
setModified(boolean modified) |
protected void |
setSelectedRoots(VirtualFile[] roots) |
public static final java.awt.Color INVALID_COLOR
protected javax.swing.JPanel myPanel
protected boolean myEnabled
public PathEditor(FileChooserDescriptor descriptor)
public void setAddBaseDir(VirtualFile addBaseDir)
protected void setEnabled(boolean enabled)
protected void setModified(boolean modified)
public boolean isModified()
public VirtualFile[] getRoots()
public void resetPath(java.util.List<? extends VirtualFile> paths)
public javax.swing.JComponent createComponent()
protected void addToolbarButtons(ToolbarDecorator toolbarDecorator)
protected boolean isRemoveActionEnabled(VirtualFile[] files)
protected VirtualFile[] doAddItems()
protected void doRemoveItems(int[] indices, javax.swing.JList<VirtualFile> list)
protected javax.swing.DefaultListModel<VirtualFile> createListModel()
protected javax.swing.ListCellRenderer<VirtualFile> createListCellRenderer(JBList<VirtualFile> list)
protected void itemsRemoved(java.util.List<VirtualFile> removedItems)
protected VirtualFile[] adjustAddedFileSet(java.awt.Component component, VirtualFile[] files)
component
- a component that could be used as a parent.files
- a selected file setprotected boolean isUrlInserted()
protected void requestDefaultFocus()
public void addPaths(VirtualFile... paths)
public void removePaths(VirtualFile... paths)
protected boolean addElement(VirtualFile item)
protected javax.swing.DefaultListModel<VirtualFile> getListModel()
protected void setSelectedRoots(VirtualFile[] roots)
protected VirtualFile[] getSelectedRoots()
protected int getRowCount()
protected VirtualFile getValueAt(int row)
public void clearList()