+2003-10-12 Michael Koch <konqueror@gmx.de>
+
+ * javax/swing/table/DefaultTableModel.java,
+ javax/swing/table/TableCellEditor.java,
+ javax/swing/table/TableCellRenderer.java,
+ javax/swing/table/TableColumnModel.java,
+ javax/swing/table/TableModel.java,
+ javax/swing/text/AbstractDocument.java,
+ javax/swing/text/Document.java,
+ javax/swing/text/MutableAttributeSet.java,
+ javax/swing/text/StyledDocument.java,
+ javax/swing/text/ViewFactory.java,
+ javax/swing/tree/DefaultMutableTreeNode.java,
+ javax/swing/tree/MutableTreeNode.java,
+ javax/swing/tree/RowMapper.java,
+ javax/swing/tree/TreeCellEditor.java,
+ javax/swing/tree/TreeCellRenderer.java,
+ javax/swing/tree/TreeModel.java,
+ javax/swing/tree/TreeNode.java,
+ javax/swing/tree/TreeSelectionModel.java,
+ javax/swing/undo/StateEditable.java,
+ javax/swing/undo/UndoableEdit.java:
+ Removed redundant modifiers.
+
2003-10-12 Michael Koch <konqueror@gmx.de>
* javax/swing/event/AncestorListener.java,
Vector data;
Vector rowData;
int rowIndex;
- int columnIndex;
int numColumns;
// Create Data
// Variables
int rowIndex;
- int columnIndex;
int numRows;
int numColumns;
Vector columnVector;
import javax.swing.CellEditor;
/**
- * TableCellEditor interface
+ * TableCellEditor public interface
* @author Andrew Selkirk
*/
public interface TableCellEditor extends CellEditor {
* @param column Column of cell
* @returns Component
*/
- public Component getTableCellEditorComponent(JTable table,
+ Component getTableCellEditorComponent(JTable table,
Object value, boolean isSelected, int row, int column);
import javax.swing.JTable;
/**
- * TableCellRenderer interface
+ * TableCellRenderer public interface
* @author Andrew Selkirk
*/
public interface TableCellRenderer {
* @param column Column of cell
* @returns Component
*/
- public Component getTableCellRendererComponent(JTable table,
+ Component getTableCellRendererComponent(JTable table,
Object value, boolean isSelected, boolean hasFocus,
int row, int column);
import javax.swing.event.TableColumnModelListener;
/**
- * TableColumnModel interface
+ * TableColumnModel public interface
* @author Andrew Selkirk
*/
public interface TableColumnModel {
* addColumn
* @param column TableColumn
*/
- public void addColumn(TableColumn column);
+ void addColumn(TableColumn column);
/**
* removeColumn
* @param column TableColumn
*/
- public void removeColumn(TableColumn column);
+ void removeColumn(TableColumn column);
/**
* moveColumn
* @param columnIndex Index of column to move
* @param newIndex New index of column
*/
- public void moveColumn(int columnIndex, int newIndex);
+ void moveColumn(int columnIndex, int newIndex);
/**
* setColumnMargin
* @param margin Margin of column
*/
- public void setColumnMargin(int margin);
+ void setColumnMargin(int margin);
/**
* getColumnCount
* @returns Column count
*/
- public int getColumnCount();
+ int getColumnCount();
/**
* getColumns
* @returns Enumeration of columns
*/
- public Enumeration getColumns();
+ Enumeration getColumns();
/**
* getColumnIndex
* @param columnIdentifier Column id
*/
- public int getColumnIndex(Object columnIdentifier);
+ int getColumnIndex(Object columnIdentifier);
/**
* getColumn
* @param columnIndex Index of column
*/
- public TableColumn getColumn(int columnIndex);
+ TableColumn getColumn(int columnIndex);
/**
* getColumnMargin
* @returns Column margin
*/
- public int getColumnMargin();
+ int getColumnMargin();
/**
* getColumnIndexAtX
* @returns Column index as position x
*/
- public int getColumnIndexAtX(int xPosition);
+ int getColumnIndexAtX(int xPosition);
/**
* getTotalColumnWidth
* @returns Total column width
*/
- public int getTotalColumnWidth();
+ int getTotalColumnWidth();
/**
* setColumnSelectionAllowed
* @param value Set column selection
*/
- public void setColumnSelectionAllowed(boolean value);
+ void setColumnSelectionAllowed(boolean value);
/**
* getColumnSelectionAllowed
* @returns true if column selection allowed, false otherwise
*/
- public boolean getColumnSelectionAllowed();
+ boolean getColumnSelectionAllowed();
/**
* getSelectedColumns
* @returns Selected columns
*/
- public int[] getSelectedColumns();
+ int[] getSelectedColumns();
/**
* getSelectedColumnCount
* @returns Count of selected columns
*/
- public int getSelectedColumnCount();
+ int getSelectedColumnCount();
/**
* setSelectionModel
* @param model ListSelectionModel
*/
- public void setSelectionModel(ListSelectionModel model);
+ void setSelectionModel(ListSelectionModel model);
/**
* getSelectionModel
* @param column TableColumn
*/
- public ListSelectionModel getSelectionModel();
+ ListSelectionModel getSelectionModel();
/**
* addColumnModelListener
* @param listener TableColumnModelListener
*/
- public void addColumnModelListener(TableColumnModelListener listener);
+ void addColumnModelListener(TableColumnModelListener listener);
/**
* removeColumnModelListener
* @param listener TableColumnModelListener
*/
- public void removeColumnModelListener(TableColumnModelListener listener);
+ void removeColumnModelListener(TableColumnModelListener listener);
} // TableColumnModel
import javax.swing.event.TableModelListener;
/**
- * TableModel interface
+ * TableModel public interface
* @author Andrew Selkirk
*/
public interface TableModel {
* getRowCount
* @returns row count
*/
- public int getRowCount();
+ int getRowCount();
/**
* getColumnCount
* @returns column count
*/
- public int getColumnCount();
+ int getColumnCount();
/**
* getColumnName
* @param columnIndex Column index
* @returns Column name
*/
- public String getColumnName(int columnIndex);
+ String getColumnName(int columnIndex);
/**
* getColumnClass
* @param columnIndex Column index
* @returns Column class
*/
- public Class getColumnClass(int columnIndex);
+ Class getColumnClass(int columnIndex);
/**
* isCellEditable
* @param columnIndex Column index
* @returns true if editable, false otherwise
*/
- public boolean isCellEditable(int rowIndex, int columnIndex);
+ boolean isCellEditable(int rowIndex, int columnIndex);
/**
* getValueAt
* @param columnIndex Column index
* @returns Value at specified indices
*/
- public Object getValueAt(int rowIndex, int columnIndex);
+ Object getValueAt(int rowIndex, int columnIndex);
/**
* setValueAt
* @param rowIndex Row index
* @param columnIndex Column index
*/
- public void setValueAt(Object aValue, int rowIndex, int columnIndex);
+ void setValueAt(Object aValue, int rowIndex, int columnIndex);
/**
* addTableModelListener
* @param listener TableModelListener
*/
- public void addTableModelListener(TableModelListener listener);
+ void addTableModelListener(TableModelListener listener);
/**
* removeTableModelListener
* @param listener TableModelListener
*/
- public void removeTableModelListener(TableModelListener listener);
+ void removeTableModelListener(TableModelListener listener);
} // TableModel
public int getStartOffset() { return 0; }
}
- public interface Content
+ interface Content
{
- public Position createPosition(int offset) throws BadLocationException;
- public int length();
- public UndoableEdit insertString(int where, String str) throws BadLocationException;
- public UndoableEdit remove(int where, int nitems) throws BadLocationException;
- public String getString(int where, int len) throws BadLocationException;
- public void getChars(int where, int len, Segment txt) throws BadLocationException;
+ Position createPosition(int offset) throws BadLocationException;
+ int length();
+ UndoableEdit insertString(int where, String str) throws BadLocationException;
+ UndoableEdit remove(int where, int nitems) throws BadLocationException;
+ String getString(int where, int len) throws BadLocationException;
+ void getChars(int where, int len, Segment txt) throws BadLocationException;
}
class DefaultDocumentEvent implements DocumentEvent
{
- int len, off;
+ public int len, off;
public Document getDocument() { return AbstractDocument.this; }
public int getLength() { return len; }
public int getOffset() { return off; }
}
- Dictionary getDocumentProperties()
+ public Dictionary getDocumentProperties()
{
return null;
}
return content.length();
}
- EventListener[] getListeners(Class listenerType)
+ public EventListener[] getListeners(Class listenerType)
{
return null;
}
{
}
- void readLock()
+ public void readLock()
{
}
- void readUnlock()
+ public void readUnlock()
{
}
public interface Document
{
- public static final String StreamDescriptionProperty = "stream";
+ String StreamDescriptionProperty = "stream";
- public static final String TitleProperty = "text";
+ String TitleProperty = "text";
void addDocumentListener(DocumentListener listener);
void addUndoableEditListener(UndoableEditListener listener);
* @param name TODO
* @param value TODO
*/
- public void addAttribute(Object name, Object value);
+ void addAttribute(Object name, Object value);
/**
* addAttributes
* @param attributes TODO
*/
- public void addAttributes(AttributeSet attributes);
+ void addAttributes(AttributeSet attributes);
/**
* removeAttribute
* @param name TODO
*/
- public void removeAttribute(Object name);
+ void removeAttribute(Object name);
/**
* removeAttributes
* @param names TODO
*/
- public void removeAttributes(Enumeration names);
+ void removeAttributes(Enumeration names);
/**
* removeAttributes
* @param attributes TODO
*/
- public void removeAttributes(AttributeSet attributes);
+ void removeAttributes(AttributeSet attributes);
/**
* setResolveParent
* @param parent TODO
*/
- public void setResolveParent(AttributeSet parent);
+ void setResolveParent(AttributeSet parent);
} // MutableAttributeSet
* @param rent TODO
* @returns Style
*/
- public Style addStyle(String nm, Style parent);
+ Style addStyle(String nm, Style parent);
/**
* removeStyle
* @param nm TODO
*/
- public void removeStyle(String nm);
+ void removeStyle(String nm);
/**
* getStyle
* @param nm TODO
* @returns Style
*/
- public Style getStyle(String nm);
+ Style getStyle(String nm);
/**
* setCharacterAttributes
* @param set TODO
* @param replace TODO
*/
- public void setCharacterAttributes(int offset, int length,
+ void setCharacterAttributes(int offset, int length,
AttributeSet set, boolean replace);
/**
* @param set TODO
* @param replace TODO
*/
- public void setParagraphAttributes(int offset, int length,
+ void setParagraphAttributes(int offset, int length,
AttributeSet set, boolean replace);
/**
* @param position TODO
* @returns Style
*/
- public Style getLogicalStyle(int position);
+ Style getLogicalStyle(int position);
/**
* setLogicalStyle
* @param position TODO
* @param style TODO
*/
- public void setLogicalStyle(int position, Style style);
+ void setLogicalStyle(int position, Style style);
/**
* getParagraphElement
* @param position TODO
* @returns Element
*/
- public abstract Element getParagraphElement(int position);
+ Element getParagraphElement(int position);
/**
* getCharacterElement
* @param position TODO
* @returns Element
*/
- public Element getCharacterElement(int position);
+ Element getCharacterElement(int position);
/**
* getForeground
* @param set TODO
* @returns Color
*/
- public Color getForeground(AttributeSet set);
+ Color getForeground(AttributeSet set);
/**
* getBackground
* @param set TODO
* @returns Color
*/
- public Color getBackground(AttributeSet set);
+ Color getBackground(AttributeSet set);
/**
* getFont
* @param set TODO
* @returns Font
*/
- public Font getFont(AttributeSet set);
+ Font getFont(AttributeSet set);
} // StyledDocument
package javax.swing.text;
-
public interface ViewFactory
{
- public View create(Element elem);
+ View create (Element elem);
}
public static void growTree(DefaultMutableTreeNode root) {
// Variables
- int size;
int index;
DefaultMutableTreeNode node;
DefaultMutableTreeNode current;
// Variables
TreeNode[] path;
Object[] object;
- int size;
int index;
// Get Path for Tree Nodes
// Variables
TreeNode current;
- int index;
// Sanity Check
if (node == null) {
*/
public boolean isNodeSibling(TreeNode node) {
- // Variables
- int index;
-
// Check for null
if (node == null) {
return false;
package javax.swing.tree;
/**
- * MutableTreeNode interface
+ * MutableTreeNode public interface
* @author Andrew Selkirk
*/
public interface MutableTreeNode extends TreeNode {
* @param child MutableTreeNode
* @param index Index
*/
- public void insert(MutableTreeNode child, int index);
+ void insert(MutableTreeNode child, int index);
/**
* remove
* @param index Index
*/
- public void remove(int index);
+ void remove(int index);
/**
* remove
* @param node MutableTreeNode
*/
- public void remove(MutableTreeNode node);
+ void remove(MutableTreeNode node);
/**
* setUserObject
* @param object Object
*/
- public void setUserObject(Object object);
+ void setUserObject(Object object);
/**
* removeFromParent
*/
- public void removeFromParent();
+ void removeFromParent();
/**
* setParent
* @param parent MutableTreeNode
*/
- public void setParent(MutableTreeNode parent);
+ void setParent(MutableTreeNode parent);
} // MutableTreeNode
package javax.swing.tree;
/**
- * RowMapper interface
+ * RowMapper public interface
* @author Andrew Selkirk
*/
public interface RowMapper {
* @param path TreePath
* @return TODO
*/
- public int[] getRowsForPaths(TreePath[] path);
+ int[] getRowsForPaths(TreePath[] path);
} // RowMapper
import javax.swing.JTree;
/**
- * TreeCellEditor interface
+ * TreeCellEditor public interface
* @author Andrew Selkirk
*/
public interface TreeCellEditor {
* @param row TODO
* @returns TODO
*/
- public Component getTreeCellEditorComponent(JTree tree,
+ Component getTreeCellEditorComponent(JTree tree,
Object value, boolean isSelected, boolean expanded,
boolean leaf, int row);
import javax.swing.JTree;
/**
- * TreeCellRenderer interface
+ * TreeCellRenderer public interface
* @author Andrew Selkirk
*/
public interface TreeCellRenderer {
* @param us TODO
* @returns TODO
*/
- public Component getTreeCellRendererComponent(JTree tree,
+ Component getTreeCellRendererComponent(JTree tree,
Object value, boolean selected, boolean expanded,
boolean leaf, int row, boolean hasFocus);
import javax.swing.event.TreeModelListener;
/**
- * TreeModel interface
+ * TreeModel public interface
* @author Andrew Selkirk
*/
public interface TreeModel {
* getRoot
* @returns Object
*/
- public abstract Object getRoot();
+ Object getRoot();
/**
* getChild
* @param index TODO
* @returns Object
*/
- public abstract Object getChild(Object parent, int index);
+ Object getChild(Object parent, int index);
/**
* getChildCount
* @param parent TODO
* @returns int
*/
- public abstract int getChildCount(Object parent);
+ int getChildCount(Object parent);
/**
* isLeaf
* @param node TODO
* @returns boolean
*/
- public abstract boolean isLeaf(Object node);
+ boolean isLeaf(Object node);
/**
* valueForPathChanged
* @param path TODO
* @param newvalue TODO
*/
- public abstract void valueForPathChanged(TreePath path, Object newvalue);
+ void valueForPathChanged(TreePath path, Object newvalue);
/**
* getIndexOfChild
* @param ild TODO
* @returns int
*/
- public abstract int getIndexOfChild(Object parent, Object child);
+ int getIndexOfChild(Object parent, Object child);
/**
* addTreeModelListener
* @param listener TODO
*/
- public abstract void addTreeModelListener(TreeModelListener listener);
+ void addTreeModelListener(TreeModelListener listener);
/**
* removeTreeModelListener
* @param listener TODO
*/
- public abstract void removeTreeModelListener(TreeModelListener listener);
+ void removeTreeModelListener(TreeModelListener listener);
} // TreeModel
import java.util.Enumeration;
/**
- * TreeNode interface
+ * TreeNode public interface
* @author Andrew Selkirk
*/
public interface TreeNode {
* getParent
* @returns TreeNode
*/
- public TreeNode getParent();
+ TreeNode getParent();
/**
* getIndex
* @param node TODO
* @returns int
*/
- public int getIndex(TreeNode node);
+ int getIndex(TreeNode node);
/**
* getChildAt
* @param index TODO
* @returns TreeNode
*/
- public TreeNode getChildAt(int index);
+ TreeNode getChildAt(int index);
/**
* getChildCount
* @returns int
*/
- public int getChildCount();
+ int getChildCount();
/**
* getAllowsChildren
* @returns boolean
*/
- public abstract boolean getAllowsChildren();
+ boolean getAllowsChildren();
/**
* isLeaf
* @returns boolean
*/
- public boolean isLeaf();
+ boolean isLeaf();
/**
* children
* @returns Enumeration
*/
- public Enumeration children();
+ Enumeration children();
} // TreeNode
import javax.swing.event.TreeSelectionListener;
/**
- * TreeSelectionModel interface
+ * TreeSelectionModel public interface
* @author Andrew Selkirk
*/
public interface TreeSelectionModel {
- public static final int SINGLE_TREE_SELECTION = 1;
- public static final int CONTIGUOUS_TREE_SELECTION = 2;
- public static final int DISCONTIGUOUS_TREE_SELECTION = 4;
+ int SINGLE_TREE_SELECTION = 1;
+ int CONTIGUOUS_TREE_SELECTION = 2;
+ int DISCONTIGUOUS_TREE_SELECTION = 4;
- public void setSelectionMode(int mode);
- public int getSelectionMode();
- public void setSelectionPath(TreePath path);
- public void setSelectionPaths(TreePath[] paths);
- public void addSelectionPath(TreePath path);
- public void addSelectionPaths(TreePath[] paths);
- public void removeSelectionPath(TreePath path);
- public void removeSelectionPaths(TreePath[] paths);
- public TreePath getSelectionPath();
- public TreePath[] getSelectionPaths();
- public int getSelectionCount();
- public boolean isPathSelected(TreePath path);
- public boolean isSelectionEmpty();
- public void clearSelection();
- public void setRowMapper(RowMapper newMapper);
- public RowMapper getRowMapper();
- public int[] getSelectionRows();
- public int getMinSelectionRow();
- public int getMaxSelectionRow();
- public boolean isRowSelected(int row);
- public void resetRowSelection();
- public int getLeadSelectionRow();
- public TreePath getLeadSelectionPath();
- public void addPropertyChangeListener(PropertyChangeListener listener);
- public void removePropertyChangeListener(PropertyChangeListener listener);
- public void addTreeSelectionListener(TreeSelectionListener x);
- public void removeTreeSelectionListener(TreeSelectionListener x);
+ void setSelectionMode(int mode);
+ int getSelectionMode();
+ void setSelectionPath(TreePath path);
+ void setSelectionPaths(TreePath[] paths);
+ void addSelectionPath(TreePath path);
+ void addSelectionPaths(TreePath[] paths);
+ void removeSelectionPath(TreePath path);
+ void removeSelectionPaths(TreePath[] paths);
+ TreePath getSelectionPath();
+ TreePath[] getSelectionPaths();
+ int getSelectionCount();
+ boolean isPathSelected(TreePath path);
+ boolean isSelectionEmpty();
+ void clearSelection();
+ void setRowMapper(RowMapper newMapper);
+ RowMapper getRowMapper();
+ int[] getSelectionRows();
+ int getMinSelectionRow();
+ int getMaxSelectionRow();
+ boolean isRowSelected(int row);
+ void resetRowSelection();
+ int getLeadSelectionRow();
+ TreePath getLeadSelectionPath();
+ void addPropertyChangeListener(PropertyChangeListener listener);
+ void removePropertyChangeListener(PropertyChangeListener listener);
+ void addTreeSelectionListener(TreeSelectionListener x);
+ void removeTreeSelectionListener(TreeSelectionListener x);
} // TreeSelectionModel
import java.util.Hashtable;
/**
- * StateEditable interface
+ * StateEditable public interface
* @author Andrew Selkirk
*/
public interface StateEditable
* Restore State
* @param state State
*/
- public void restoreState(Hashtable state);
+ void restoreState(Hashtable state);
/**
* Store State
* @param state State
*/
- public void storeState(Hashtable state);
+ void storeState(Hashtable state);
/**
* For some reason, Sun made the RCS IDs visible.
*/
- public static final String RCSID = "We aren't compatible";
+ String RCSID = "We aren't compatible";
} // StateEditable
package javax.swing.undo;
/**
- * UndoableEdit interface
+ * UndoableEdit public interface
* @author Andrew Selkirk
*/
public interface UndoableEdit {
* @param anEdit TODO
* @returns TODO
*/
- public boolean addEdit(UndoableEdit anEdit);
+ boolean addEdit(UndoableEdit anEdit);
/**
* canRedo
* @returns TODO
*/
- public boolean canRedo();
+ boolean canRedo();
/**
* canRedo
* @returns TODO
*/
- public boolean canUndo();
+ boolean canUndo();
/**
* die
*/
- public void die();
+ void die();
/**
* getPresentationName
* @returns TODO
*/
- public String getPresentationName();
+ String getPresentationName();
/**
* getRedoPresentationName
* @returns TODO
*/
- public String getRedoPresentationName();
+ String getRedoPresentationName();
/**
* getUndoPresentationName
* @returns TODO
*/
- public String getUndoPresentationName();
+ String getUndoPresentationName();
/**
* isSignificant
* @returns TODO
*/
- public boolean isSignificant();
+ boolean isSignificant();
/**
* redo
* @throws CannotRedoException TODO
*/
- public void redo() throws CannotRedoException;
+ void redo() throws CannotRedoException;
/**
* replaceEdit
* @param anEdit TODO
* @returns TODO
*/
- public boolean replaceEdit(UndoableEdit anEdit);
+ boolean replaceEdit(UndoableEdit anEdit);
/**
* undo
* @throws CannotUndoException TODO
*/
- public void undo() throws CannotUndoException;
+ void undo() throws CannotUndoException;
} // UndoableEdit