diff options
author | Noel Grandin <noel@peralex.com> | 2014-12-10 15:36:24 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2014-12-11 06:09:03 +0000 |
commit | 7557f23b31dcfb4d86c122bb34d9675c0db9a694 (patch) | |
tree | 5feb7be2b0841d8ee60d935cf2e29e9a01a31a27 /toolkit/test/accessibility | |
parent | 808fd5fbd8868dfd95c8a38676815798fa2b79c4 (diff) |
java: reduce visibility of fields and methods
found by PMD
Change-Id: Id6737916b68ccbdbdeec5d314747a38410923ac6
Reviewed-on: https://gerrit.libreoffice.org/13409
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'toolkit/test/accessibility')
34 files changed, 112 insertions, 112 deletions
diff --git a/toolkit/test/accessibility/AccTreeNode.java b/toolkit/test/accessibility/AccTreeNode.java index 73fa129ceaea..f728d8536869 100644 --- a/toolkit/test/accessibility/AccTreeNode.java +++ b/toolkit/test/accessibility/AccTreeNode.java @@ -38,15 +38,15 @@ import com.sun.star.uno.UnoRuntime; class AccTreeNode extends AccessibleTreeNode { - class HandlerDescriptor + private class HandlerDescriptor { - public HandlerDescriptor (NodeHandler aHandler) + private HandlerDescriptor (NodeHandler aHandler) { maHandler = aHandler; mnChildCount = -1; } - public NodeHandler maHandler; - public int mnChildCount; + private NodeHandler maHandler; + private int mnChildCount; } /// NodeHandlers for this node private ArrayList<HandlerDescriptor> maHandlers; @@ -158,7 +158,7 @@ class AccTreeNode /** iterate over handlers and return child sum */ - protected HandlerDescriptor getHandlerDescriptor (int i) + private HandlerDescriptor getHandlerDescriptor (int i) { HandlerDescriptor aDescriptor = maHandlers.get(i); if (aDescriptor.mnChildCount < 0) diff --git a/toolkit/test/accessibility/AccessibilityTree.java b/toolkit/test/accessibility/AccessibilityTree.java index 844065d3e3b6..f1210afee26e 100644 --- a/toolkit/test/accessibility/AccessibilityTree.java +++ b/toolkit/test/accessibility/AccessibilityTree.java @@ -113,7 +113,7 @@ public class AccessibilityTree /** Expand the nodes in the subtree rooted in aNode according to the specified expander. The tree is locked during the expansion. */ - protected void expandTree (AccessibleTreeNode aNode, Expander aExpander) + private void expandTree (AccessibleTreeNode aNode, Expander aExpander) { if (mnExpandLevel == 0) { @@ -189,7 +189,7 @@ public class AccessibilityTree { expandShapes ((AccessibleTreeNode)maTree.getModel().getRoot()); } - public void expandShapes (AccessibleTreeNode aNode) + private void expandShapes (AccessibleTreeNode aNode) { expandTree (aNode, new ShapeExpander()); } @@ -199,7 +199,7 @@ public class AccessibilityTree { expandAll ((AccessibleTreeNode)maTree.getModel().getRoot()); } - public void expandAll (AccessibleTreeNode aNode) + private void expandAll (AccessibleTreeNode aNode) { expandTree (aNode, new AllExpander()); } @@ -222,7 +222,7 @@ public class AccessibilityTree } */ - class MouseListener extends MouseAdapter + private class MouseListener extends MouseAdapter { public MouseListener (AccessibilityTree aTree) { @@ -239,7 +239,7 @@ public class AccessibilityTree @Override public void mouseReleased(MouseEvent e) { popupTrigger(e); } - public boolean popupTrigger( MouseEvent e ) + private boolean popupTrigger( MouseEvent e ) { boolean bIsPopup = e.isPopupTrigger(); if( !bIsPopup ) @@ -296,12 +296,12 @@ public class AccessibilityTree private final AccessibilityTree maTree; } - class NodeAction extends AbstractAction + private class NodeAction extends AbstractAction { private final int mnIndex; private final AccessibleTreeNode maNode; - public NodeAction( String aName, AccessibleTreeNode aNode, int nIndex ) + private NodeAction( String aName, AccessibleTreeNode aNode, int nIndex ) { super( aName ); maNode = aNode; @@ -315,7 +315,7 @@ public class AccessibilityTree } // This action expands all shapes in the subtree rooted in the specified node. - class ShapeExpandAction extends AbstractAction + private class ShapeExpandAction extends AbstractAction { private final AccessibilityTree maTree; private final AccTreeNode maNode; @@ -332,7 +332,7 @@ public class AccessibilityTree } // This action expands all nodes in the subtree rooted in the specified node. - class SubtreeExpandAction extends AbstractAction + private class SubtreeExpandAction extends AbstractAction { private final AccessibilityTree maTree; private final AccTreeNode maNode; @@ -350,20 +350,20 @@ public class AccessibilityTree /** Predicate class to determine whether a node should be expanded * For use with expandTree method */ - abstract class Expander + private abstract class Expander { abstract public boolean expand (Object aObject); } /** expand all nodes */ - class AllExpander extends Expander + private class AllExpander extends Expander { @Override public boolean expand(Object aObject) { return true; } } /** expand all nodes with accessibility roles > 100 */ - class ShapeExpander extends Expander + private class ShapeExpander extends Expander { @Override public boolean expand (Object aObject) @@ -382,7 +382,7 @@ public class AccessibilityTree - protected AccessibleTreeCellRenderer maCellRenderer; + private AccessibleTreeCellRenderer maCellRenderer; private final JTree maTree; private int mnExpandLevel; } diff --git a/toolkit/test/accessibility/AccessibilityTreeModel.java b/toolkit/test/accessibility/AccessibilityTreeModel.java index cee0f86842b6..4bf258ce7f55 100644 --- a/toolkit/test/accessibility/AccessibilityTreeModel.java +++ b/toolkit/test/accessibility/AccessibilityTreeModel.java @@ -30,7 +30,7 @@ import com.sun.star.uno.UnoRuntime; public class AccessibilityTreeModel extends AccessibilityTreeModelBase { - public boolean mbVerbose = false; + private boolean mbVerbose = false; public AccessibilityTreeModel (AccessibleTreeNode aRoot) { @@ -147,7 +147,7 @@ public class AccessibilityTreeModel /** Remove a node (and all children) from the tree model. */ - protected boolean removeChild (AccessibleTreeNode aNode) + private boolean removeChild (AccessibleTreeNode aNode) { try { @@ -206,7 +206,7 @@ public class AccessibilityTreeModel Returns the new or existing representation of the specified accessible object. */ - protected AccessibleTreeNode addChild (AccTreeNode aParentNode, XAccessible xNewChild) + private AccessibleTreeNode addChild (AccTreeNode aParentNode, XAccessible xNewChild) { AccessibleTreeNode aChildNode = null; try @@ -258,7 +258,7 @@ public class AccessibilityTreeModel @param aNode The node to insert into the internal tree structure. */ - protected boolean addNode (AccessibleTreeNode aNode) + private boolean addNode (AccessibleTreeNode aNode) { boolean bRet = false; try @@ -293,7 +293,7 @@ public class AccessibilityTreeModel /** create path to node, suitable for TreeModelEvent constructor * @see javax.swing.event.TreeModelEvent#TreeModelEvent */ - protected Object[] createPath (AccessibleTreeNode aNode) + private Object[] createPath (AccessibleTreeNode aNode) { ArrayList<AccessibleTreeNode> aPath = new ArrayList<AccessibleTreeNode>(); aNode.createPath (aPath); @@ -307,7 +307,7 @@ public class AccessibilityTreeModel // tree cache, and we should get removed as soon as they are out. - protected void fireTreeNodesChanged(TreeModelEvent e) + private void fireTreeNodesChanged(TreeModelEvent e) { for(int i = 0; i < maTMListeners.size(); i++) { @@ -323,7 +323,7 @@ public class AccessibilityTreeModel } } - protected void fireTreeNodesRemoved(final TreeModelEvent e) + private void fireTreeNodesRemoved(final TreeModelEvent e) { for(int i = 0; i < maTMListeners.size(); i++) { @@ -331,7 +331,7 @@ public class AccessibilityTreeModel } } - protected void fireTreeStructureChanged(final TreeModelEvent e) + private void fireTreeStructureChanged(final TreeModelEvent e) { for(int i = 0; i < maTMListeners.size(); i++) { @@ -348,13 +348,13 @@ public class AccessibilityTreeModel /** Create a TreeModelEvent object that informs listeners that one child has been removed from or inserted into its parent. */ - public TreeModelEvent createChildUpdateEvent (XAccessibleContext xParent) + private TreeModelEvent createChildUpdateEvent (XAccessibleContext xParent) { AccessibleTreeNode aParentNode = maNodeMap.GetNode (xParent); return createEvent (aParentNode, xParent); } - public TreeModelEvent createEvent (AccessibleTreeNode aParentNode, XAccessibleContext xChild) + private TreeModelEvent createEvent (AccessibleTreeNode aParentNode, XAccessibleContext xChild) { AccessibleTreeNode aChildNode = null; if (xChild != null) @@ -394,7 +394,7 @@ public class AccessibilityTreeModel /** Create a TreeModelEvent that indicates changes at those children of the specified node with the specified indices. */ - protected TreeModelEvent createChangeEvent (AccTreeNode aNode, java.util.List<Integer> aChildIndices) + private TreeModelEvent createChangeEvent (AccTreeNode aNode, java.util.List<Integer> aChildIndices) { // Build a list of child objects that are indicated by the given indices. int nCount = aChildIndices.size(); @@ -415,7 +415,7 @@ public class AccessibilityTreeModel - protected XAccessibleEventBroadcaster getBroadcaster (Object aObject) + private XAccessibleEventBroadcaster getBroadcaster (Object aObject) { if (aObject instanceof AccTreeNode) return UnoRuntime.queryInterface ( @@ -424,7 +424,7 @@ public class AccessibilityTreeModel return null; } - protected void registerAccListener( Object aObject ) + private void registerAccListener( Object aObject ) { // register this as listener for XAccessibleEventBroadcaster // implementations @@ -435,7 +435,7 @@ public class AccessibilityTreeModel } } - protected void removeAccListener( Object aObject ) + private void removeAccListener( Object aObject ) { XAccessibleEventBroadcaster xBroadcaster = getBroadcaster( aObject ); if (xBroadcaster != null) diff --git a/toolkit/test/accessibility/AccessibilityWorkBench.java b/toolkit/test/accessibility/AccessibilityWorkBench.java index a069c97b266d..4e29d6744942 100644 --- a/toolkit/test/accessibility/AccessibilityWorkBench.java +++ b/toolkit/test/accessibility/AccessibilityWorkBench.java @@ -43,8 +43,8 @@ public class AccessibilityWorkBench implements ActionListener, XTerminateListener, TreeSelectionListener { - public static final String msVersion = "v1.7.2"; - public String msOptionsFileName = ".AWBrc"; + private static final String msVersion = "v1.7.2"; + private String msOptionsFileName = ".AWBrc"; public static void main (String args[]) { @@ -116,7 +116,7 @@ public class AccessibilityWorkBench /** Create and arrange the widgets of the GUI. */ - public void Layout () + private void Layout () { setSize (new Dimension (8000,600)); @@ -209,7 +209,7 @@ public class AccessibilityWorkBench /** Shortcut method for adding an object to a GridBagLayout. */ - void addGridElement (JComponent object, + private void addGridElement (JComponent object, int x, int y, int width, int height, int weightx, int weighty, int anchor, int fill) { @@ -231,7 +231,7 @@ public class AccessibilityWorkBench /** Create a new button and place at the right most position into the button bar. */ - public JButton createButton (String title, String command) + private JButton createButton (String title, String command) { JButton aButton = new JButton (title); aButton.setEnabled (false); @@ -250,7 +250,7 @@ public class AccessibilityWorkBench Returns the new menu bar. The returned reference is also remembered in the data member <member>maMenuBar</member>. */ - JMenuBar CreateMenuBar () + private JMenuBar CreateMenuBar () { // Menu bar. JMenuBar aMenuBar = new JMenuBar (); @@ -342,7 +342,7 @@ public class AccessibilityWorkBench actions will be carried out every time. The main purpose of a second call is that of a re-initialization after a reconnect. */ - protected void initialize () + private void initialize () { maCanvas.clear(); @@ -385,7 +385,7 @@ public class AccessibilityWorkBench /** Update the states of the buttons according to the internal state of the AWB. */ - protected void UpdateButtonStates () + private void UpdateButtonStates () { aConnectButton.setEnabled (mbInitialized); aQuitButton.setEnabled (mbInitialized); @@ -566,9 +566,9 @@ public class AccessibilityWorkBench private static AccessibilityWorkBench saWorkBench = null; - protected SimpleOffice + private SimpleOffice office; - protected InformationWriter + private InformationWriter info; private JPanel diff --git a/toolkit/test/accessibility/AccessibleActionHandler.java b/toolkit/test/accessibility/AccessibleActionHandler.java index 4abfb09ccaac..868ea1105cfb 100644 --- a/toolkit/test/accessibility/AccessibleActionHandler.java +++ b/toolkit/test/accessibility/AccessibleActionHandler.java @@ -40,7 +40,7 @@ class AccessibleActionHandler { } - public AccessibleActionHandler (XAccessibleAction xAction) + private AccessibleActionHandler (XAccessibleAction xAction) { if (xAction != null) maChildList.setSize (1 + xAction.getAccessibleActionCount()); diff --git a/toolkit/test/accessibility/AccessibleCellHandler.java b/toolkit/test/accessibility/AccessibleCellHandler.java index d99fdbfe4cb4..c52532d8555c 100644 --- a/toolkit/test/accessibility/AccessibleCellHandler.java +++ b/toolkit/test/accessibility/AccessibleCellHandler.java @@ -47,7 +47,7 @@ class AccessibleCellHandler extends NodeHandler { } - public AccessibleCellHandler (XAccessibleTable xTable) + private AccessibleCellHandler (XAccessibleTable xTable) { if (xTable != null) maChildList.setSize (8); diff --git a/toolkit/test/accessibility/AccessibleComponentHandler.java b/toolkit/test/accessibility/AccessibleComponentHandler.java index 01a86c83fb21..7420a00daf51 100644 --- a/toolkit/test/accessibility/AccessibleComponentHandler.java +++ b/toolkit/test/accessibility/AccessibleComponentHandler.java @@ -42,7 +42,7 @@ class AccessibleComponentHandler { } - public AccessibleComponentHandler (XAccessibleComponent xComponent) + private AccessibleComponentHandler (XAccessibleComponent xComponent) { if (xComponent != null) maChildList.setSize (6); diff --git a/toolkit/test/accessibility/AccessibleContextHandler.java b/toolkit/test/accessibility/AccessibleContextHandler.java index 8409a9a7da88..9483c5c79b9a 100644 --- a/toolkit/test/accessibility/AccessibleContextHandler.java +++ b/toolkit/test/accessibility/AccessibleContextHandler.java @@ -40,7 +40,7 @@ class AccessibleContextHandler super (); } - public AccessibleContextHandler (XAccessibleContext xContext) + private AccessibleContextHandler (XAccessibleContext xContext) { super(); if (xContext != null) diff --git a/toolkit/test/accessibility/AccessibleEditableTextHandler.java b/toolkit/test/accessibility/AccessibleEditableTextHandler.java index fa9b0d521217..a31073b22af5 100644 --- a/toolkit/test/accessibility/AccessibleEditableTextHandler.java +++ b/toolkit/test/accessibility/AccessibleEditableTextHandler.java @@ -39,7 +39,7 @@ class AccessibleEditableTextHandler extends NodeHandler { } - public AccessibleEditableTextHandler (XAccessibleEditableText xText) + private AccessibleEditableTextHandler (XAccessibleEditableText xText) { if (xText != null) maChildList.setSize (1); diff --git a/toolkit/test/accessibility/AccessibleExtendedComponentHandler.java b/toolkit/test/accessibility/AccessibleExtendedComponentHandler.java index 3cdf1d405017..f34ed1b5fc60 100644 --- a/toolkit/test/accessibility/AccessibleExtendedComponentHandler.java +++ b/toolkit/test/accessibility/AccessibleExtendedComponentHandler.java @@ -40,7 +40,7 @@ class AccessibleExtendedComponentHandler { } - public AccessibleExtendedComponentHandler (XAccessibleExtendedComponent xEComponent) + private AccessibleExtendedComponentHandler (XAccessibleExtendedComponent xEComponent) { if (xEComponent != null) maChildList.setSize (0); diff --git a/toolkit/test/accessibility/AccessibleHyperlinkHandler.java b/toolkit/test/accessibility/AccessibleHyperlinkHandler.java index d46288e529cd..9af7390e9749 100644 --- a/toolkit/test/accessibility/AccessibleHyperlinkHandler.java +++ b/toolkit/test/accessibility/AccessibleHyperlinkHandler.java @@ -39,7 +39,7 @@ class AccessibleHyperlinkHandler extends AccessibleTreeHandler { } - public AccessibleHyperlinkHandler (XAccessibleHyperlink xLink) + private AccessibleHyperlinkHandler (XAccessibleHyperlink xLink) { if (xLink != null) maChildList.setSize (1); diff --git a/toolkit/test/accessibility/AccessibleHypertextHandler.java b/toolkit/test/accessibility/AccessibleHypertextHandler.java index cba62589d201..7021c2abc77e 100644 --- a/toolkit/test/accessibility/AccessibleHypertextHandler.java +++ b/toolkit/test/accessibility/AccessibleHypertextHandler.java @@ -39,7 +39,7 @@ class AccessibleHypertextHandler extends AccessibleTreeHandler { } - public AccessibleHypertextHandler (XAccessibleHypertext xText) + private AccessibleHypertextHandler (XAccessibleHypertext xText) { if (xText != null) maChildList.setSize (1); diff --git a/toolkit/test/accessibility/AccessibleImageHandler.java b/toolkit/test/accessibility/AccessibleImageHandler.java index cec93c55e97f..a02077b7d2d2 100644 --- a/toolkit/test/accessibility/AccessibleImageHandler.java +++ b/toolkit/test/accessibility/AccessibleImageHandler.java @@ -39,13 +39,13 @@ class AccessibleImageHandler extends NodeHandler { } - public AccessibleImageHandler (XAccessibleImage xImage) + private AccessibleImageHandler (XAccessibleImage xImage) { if (xImage != null) maChildList.setSize (1); } - protected static XAccessibleImage getImage (AccTreeNode aNode) + private static XAccessibleImage getImage (AccTreeNode aNode) { return UnoRuntime.queryInterface ( XAccessibleImage.class, aNode.getContext()); diff --git a/toolkit/test/accessibility/AccessibleRelationHandler.java b/toolkit/test/accessibility/AccessibleRelationHandler.java index 884f0493c7cd..1f7eebada20f 100644 --- a/toolkit/test/accessibility/AccessibleRelationHandler.java +++ b/toolkit/test/accessibility/AccessibleRelationHandler.java @@ -45,7 +45,7 @@ class AccessibleRelationHandler { } - public AccessibleRelationHandler( XAccessibleContext xContext ) + private AccessibleRelationHandler( XAccessibleContext xContext ) { XAccessibleRelationSet xRelation = xContext.getAccessibleRelationSet(); if (xRelation != null) diff --git a/toolkit/test/accessibility/AccessibleSelectionHandler.java b/toolkit/test/accessibility/AccessibleSelectionHandler.java index ece8153b67e5..4a8cd24ba9c9 100644 --- a/toolkit/test/accessibility/AccessibleSelectionHandler.java +++ b/toolkit/test/accessibility/AccessibleSelectionHandler.java @@ -41,7 +41,7 @@ class AccessibleSelectionHandler { } - public AccessibleSelectionHandler( XAccessibleSelection xSelection ) + private AccessibleSelectionHandler( XAccessibleSelection xSelection ) { if (xSelection != null) maChildList.setSize( 2 ); diff --git a/toolkit/test/accessibility/AccessibleTableHandler.java b/toolkit/test/accessibility/AccessibleTableHandler.java index 9ec6ccb2de7d..8697a52a0232 100644 --- a/toolkit/test/accessibility/AccessibleTableHandler.java +++ b/toolkit/test/accessibility/AccessibleTableHandler.java @@ -39,7 +39,7 @@ class AccessibleTableHandler extends NodeHandler { } - public AccessibleTableHandler (XAccessibleTable xTable) + private AccessibleTableHandler (XAccessibleTable xTable) { if (xTable != null) maChildList.setSize (4); diff --git a/toolkit/test/accessibility/AccessibleTextHandler.java b/toolkit/test/accessibility/AccessibleTextHandler.java index dfecd974803c..714bcb591021 100644 --- a/toolkit/test/accessibility/AccessibleTextHandler.java +++ b/toolkit/test/accessibility/AccessibleTextHandler.java @@ -67,7 +67,7 @@ class AccessibleTextHandler extends NodeHandler { } - public AccessibleTextHandler (XAccessibleText xText) + private AccessibleTextHandler (XAccessibleText xText) { if (xText != null) maChildList.setSize (8); @@ -379,9 +379,9 @@ class AccessibleTextHandler extends NodeHandler } - static String[] aTextActions = + private static String[] aTextActions = new String[] { "select...", "copy..." }; - static String[] aEditableTextActions = + private static String[] aEditableTextActions = new String[] { "select...", "copy...", "cut...", "paste...", "edit...", "format..." }; @@ -491,10 +491,10 @@ class AccessibleTextHandler extends NodeHandler abstract class TextActionDialog extends JDialog implements ActionListener { - AccTreeNode aNode; + private AccTreeNode aNode; JTextArea aText; - String sName; - JCheckBox aIndexToggle; + private String sName; + private JCheckBox aIndexToggle; public TextActionDialog( AccTreeNode aNd, String sExplanation, @@ -548,13 +548,13 @@ abstract class TextActionDialog extends JDialog aContent.add( aButtons, BorderLayout.SOUTH ); } - void cancel() + private void cancel() { setVisible(false); dispose(); } - void action() + private void action() { String sError = null; try @@ -589,7 +589,7 @@ abstract class TextActionDialog extends JDialog int getSelectionStart() { return getSelection(true); } int getSelectionEnd() { return getSelection(false); } - int getSelection(boolean bStart) + private int getSelection(boolean bStart) { return ( bStart ^ aIndexToggle.isSelected() ) ? aText.getSelectionStart() : aText.getSelectionEnd(); @@ -634,7 +634,7 @@ class TextEditDialog extends TextActionDialog /** update the text */ - boolean updateText( XAccessibleEditableText xEdit, String sNew ) + private boolean updateText( XAccessibleEditableText xEdit, String sNew ) { String sOld = xEdit.getText(); @@ -757,11 +757,11 @@ class TextAttributeDialog extends TextActionDialog } - class ColorIcon implements Icon + private class ColorIcon implements Icon { - boolean bForeground; - static final int nHeight = 16; - static final int nWidth = 16; + private boolean bForeground; + private static final int nHeight = 16; + private static final int nWidth = 16; public ColorIcon(boolean bWhich) { bForeground = bWhich; } public int getIconHeight() { return nHeight; } diff --git a/toolkit/test/accessibility/AccessibleTreeCellRenderer.java b/toolkit/test/accessibility/AccessibleTreeCellRenderer.java index cd032b9aa17e..3a1f7150b5e6 100644 --- a/toolkit/test/accessibility/AccessibleTreeCellRenderer.java +++ b/toolkit/test/accessibility/AccessibleTreeCellRenderer.java @@ -29,10 +29,10 @@ import javax.swing.tree.TreePath; public class AccessibleTreeCellRenderer extends DefaultTreeCellRenderer { - public Color + private Color maDefaultColor, maChangedColor; - protected ArrayList<Boolean> + private ArrayList<Boolean> maChangedLines; @@ -77,7 +77,7 @@ public class AccessibleTreeCellRenderer /** Inform the cell renderer of a new changed line which to paint highlighted when asked to paint it the next time. */ - public void addChangedLine (int nRow) + private void addChangedLine (int nRow) { while (maChangedLines.size() <= nRow) { maChangedLines.add(null); diff --git a/toolkit/test/accessibility/AccessibleTreeHandler.java b/toolkit/test/accessibility/AccessibleTreeHandler.java index 5f9830f6574c..e022dbae8d6b 100644 --- a/toolkit/test/accessibility/AccessibleTreeHandler.java +++ b/toolkit/test/accessibility/AccessibleTreeHandler.java @@ -28,7 +28,7 @@ import com.sun.star.lang.IndexOutOfBoundsException; class AccessibleTreeHandler extends NodeHandler { - protected XAccessibleContext mxContext; + private XAccessibleContext mxContext; @Override public NodeHandler createHandler (XAccessibleContext xContext) @@ -45,7 +45,7 @@ class AccessibleTreeHandler mxContext = null; } - public AccessibleTreeHandler (XAccessibleContext xContext) + private AccessibleTreeHandler (XAccessibleContext xContext) { super(); mxContext = xContext; diff --git a/toolkit/test/accessibility/AccessibleTreeNode.java b/toolkit/test/accessibility/AccessibleTreeNode.java index a127402bd30d..17b90b9dbcbd 100644 --- a/toolkit/test/accessibility/AccessibleTreeNode.java +++ b/toolkit/test/accessibility/AccessibleTreeNode.java @@ -26,7 +26,7 @@ import com.sun.star.lang.IndexOutOfBoundsException; class AccessibleTreeNode { /// The parent node. It is null for the root node. - protected AccessibleTreeNode maParent; + private AccessibleTreeNode maParent; /// The object to be displayed. private final Object maDisplayObject; diff --git a/toolkit/test/accessibility/Canvas.java b/toolkit/test/accessibility/Canvas.java index 0aeec9c24ea6..e2e1fabf0810 100644 --- a/toolkit/test/accessibility/Canvas.java +++ b/toolkit/test/accessibility/Canvas.java @@ -190,7 +190,7 @@ class Canvas return Options.GetBoolean ("ShowText"); } - public void setShowText (boolean bNewValue) + private void setShowText (boolean bNewValue) { Options.SetBoolean ("ShowText", bNewValue); repaint (); @@ -202,7 +202,7 @@ class Canvas repaint (); } - public int getZoomMode () + private int getZoomMode () { return Options.GetInteger ("ZoomMode", WHOLE_SCREEN); } @@ -388,7 +388,7 @@ class Canvas highlightObject (FindCanvasShapeUnderMouse (e)); } - protected CanvasShape FindCanvasShapeUnderMouse (MouseEvent e) + private CanvasShape FindCanvasShapeUnderMouse (MouseEvent e) { CanvasShape aObjectUnderMouse = null; int nCount = maObjectList.size(); @@ -405,7 +405,7 @@ class Canvas return aObjectUnderMouse; } - protected boolean highlightObject (CanvasShape aNewActiveObject) + private boolean highlightObject (CanvasShape aNewActiveObject) { if (aNewActiveObject != maActiveObject) { diff --git a/toolkit/test/accessibility/CanvasShape.java b/toolkit/test/accessibility/CanvasShape.java index b0767e619a0b..aa1e47be4420 100644 --- a/toolkit/test/accessibility/CanvasShape.java +++ b/toolkit/test/accessibility/CanvasShape.java @@ -28,9 +28,9 @@ import com.sun.star.accessibility.AccessibleStateType; class CanvasShape { - public final Color maHighlightColor = Color.red; - public final Color maSelectionColor = Color.green; - public final Color maFocusColor = Color.blue; + private final Color maHighlightColor = Color.red; + private final Color maSelectionColor = Color.green; + private final Color maFocusColor = Color.blue; public CanvasShape (AccTreeNode aNode) { diff --git a/toolkit/test/accessibility/EventListener.java b/toolkit/test/accessibility/EventListener.java index 43a53774a910..5d9141953d60 100644 --- a/toolkit/test/accessibility/EventListener.java +++ b/toolkit/test/accessibility/EventListener.java @@ -23,7 +23,7 @@ import com.sun.star.accessibility.*; */ public class EventListener { - public boolean mbVerbose = false; + private boolean mbVerbose = false; public EventListener (AccessibilityTreeModel aTreeModel) { diff --git a/toolkit/test/accessibility/EventQueue.java b/toolkit/test/accessibility/EventQueue.java index 5658ce2414d6..8449c6416ebc 100644 --- a/toolkit/test/accessibility/EventQueue.java +++ b/toolkit/test/accessibility/EventQueue.java @@ -27,8 +27,8 @@ import java.util.LinkedList; class EventQueue implements Runnable { - public boolean mbVerbose = false; - public boolean mbHandleDisposingEventsSynchronous = true; + private boolean mbVerbose = false; + private boolean mbHandleDisposingEventsSynchronous = true; public synchronized static EventQueue Instance () { diff --git a/toolkit/test/accessibility/HelpWindow.java b/toolkit/test/accessibility/HelpWindow.java index 13d2beb0a315..171931eee6d8 100644 --- a/toolkit/test/accessibility/HelpWindow.java +++ b/toolkit/test/accessibility/HelpWindow.java @@ -69,7 +69,7 @@ class HelpWindow - public void loadURL (URL aURL) + private void loadURL (URL aURL) { maHistory.addLast (aURL); selectHistoryPage (maHistory.size()-1); diff --git a/toolkit/test/accessibility/InformationWriter.java b/toolkit/test/accessibility/InformationWriter.java index 27950c24f579..6642a8fb9981 100644 --- a/toolkit/test/accessibility/InformationWriter.java +++ b/toolkit/test/accessibility/InformationWriter.java @@ -60,7 +60,7 @@ public class InformationWriter } } - public void printProperty (XInterface xObject, String prefix, String name) + private void printProperty (XInterface xObject, String prefix, String name) { try { @@ -216,7 +216,7 @@ public class InformationWriter /** @descr Print information concerning the accessibility of the given object. */ - public boolean showAccessibility (XInterface xObject, int depth) + private boolean showAccessibility (XInterface xObject, int depth) { try { @@ -320,7 +320,7 @@ public class InformationWriter /** @descr Print information about the given accessible component. */ - public void showAccessibleComponent (XInterface xObject, String sIndent) + private void showAccessibleComponent (XInterface xObject, String sIndent) { try { diff --git a/toolkit/test/accessibility/MessageArea.java b/toolkit/test/accessibility/MessageArea.java index 1b83d567c77c..8ee0b98e6ccc 100644 --- a/toolkit/test/accessibility/MessageArea.java +++ b/toolkit/test/accessibility/MessageArea.java @@ -74,7 +74,7 @@ public class MessageArea /** Show the given string at the end of the message area and scroll to make it visible. Indent the string as requested. */ - public static synchronized void print (int nIndentation, String aMessage) + private static synchronized void print (int nIndentation, String aMessage) { while (nIndentation-- > 0) { aMessage = " " + aMessage; @@ -99,7 +99,7 @@ public class MessageArea /** Show the given string at the end of the message area and scroll to make it visible. */ - public static void println (int nIndentation, String aMessage) + private static void println (int nIndentation, String aMessage) { print (nIndentation, aMessage+"\n"); } diff --git a/toolkit/test/accessibility/SelectionDialog.java b/toolkit/test/accessibility/SelectionDialog.java index 6f08532cce8e..2f0c6d543446 100644 --- a/toolkit/test/accessibility/SelectionDialog.java +++ b/toolkit/test/accessibility/SelectionDialog.java @@ -53,7 +53,7 @@ class SelectionDialog extends JDialog } /** build dialog */ - protected void Layout () + private void Layout () { setTitle( "Select" ); @@ -132,13 +132,13 @@ class SelectionDialog extends JDialog } - void close () + private void close () { setVisible(false); dispose(); } - void select() + private void select() { try { @@ -153,7 +153,7 @@ class SelectionDialog extends JDialog } } - void deselect() + private void deselect() { try { @@ -169,12 +169,12 @@ class SelectionDialog extends JDialog } } - void selectAll() + private void selectAll() { mxSelection.selectAllAccessibleChildren(); } - void clearSelection() + private void clearSelection() { mxSelection.clearAccessibleSelection(); } diff --git a/toolkit/test/accessibility/SimpleOffice.java b/toolkit/test/accessibility/SimpleOffice.java index 134e0d29fa5b..dcb0b671c01d 100644 --- a/toolkit/test/accessibility/SimpleOffice.java +++ b/toolkit/test/accessibility/SimpleOffice.java @@ -48,8 +48,8 @@ import com.sun.star.awt.XExtendedToolkit; */ public class SimpleOffice { - XDesktop mxDesktop = null; - OfficeConnection aConnection; + private XDesktop mxDesktop = null; + private OfficeConnection aConnection; int mnPortNumber; public SimpleOffice (int nPortNumber) @@ -260,7 +260,7 @@ public class SimpleOffice - public XWindow getCurrentWindow (XModel xModel) + private XWindow getCurrentWindow (XModel xModel) { XWindow xWindow = null; try @@ -297,7 +297,7 @@ public class SimpleOffice - public XDrawPage getCurrentDrawPage (XDrawView xView) + private XDrawPage getCurrentDrawPage (XDrawView xView) { XDrawPage xPage = null; try @@ -320,12 +320,12 @@ public class SimpleOffice /** @descr Return the current view of the given desktop. */ - public XDrawView getCurrentView () + private XDrawView getCurrentView () { return getCurrentView (getDesktop()); } - public XDrawView getCurrentView (XDesktop xDesktop) + private XDrawView getCurrentView (XDesktop xDesktop) { if (xDesktop == null) MessageArea.println ("can't get desktop to retrieve current view"); diff --git a/toolkit/test/accessibility/ov/ContextView.java b/toolkit/test/accessibility/ov/ContextView.java index 0751ef86e030..e2667abde907 100644 --- a/toolkit/test/accessibility/ov/ContextView.java +++ b/toolkit/test/accessibility/ov/ContextView.java @@ -47,7 +47,7 @@ public class ContextView return null; } - public ContextView (ObjectViewContainer aContainer) + private ContextView (ObjectViewContainer aContainer) { super (aContainer); JLabel aNameLabel = new JLabel ("Name: "); diff --git a/toolkit/test/accessibility/ov/FocusView.java b/toolkit/test/accessibility/ov/FocusView.java index 8ae028841c4e..b7a489d896b2 100644 --- a/toolkit/test/accessibility/ov/FocusView.java +++ b/toolkit/test/accessibility/ov/FocusView.java @@ -53,7 +53,7 @@ public class FocusView return null; } - public FocusView (ObjectViewContainer aContainer) + private FocusView (ObjectViewContainer aContainer) { super (aContainer); diff --git a/toolkit/test/accessibility/ov/ObjectViewContainer.java b/toolkit/test/accessibility/ov/ObjectViewContainer.java index e0b5cc08252e..7d9e5cb9b1f6 100644 --- a/toolkit/test/accessibility/ov/ObjectViewContainer.java +++ b/toolkit/test/accessibility/ov/ObjectViewContainer.java @@ -103,7 +103,7 @@ public class ObjectViewContainer /** Add the given class to the list of classes which will be instantiated the next time an accessible object is set. */ - public void RegisterView (Class aObjectViewClass) + private void RegisterView (Class aObjectViewClass) { System.out.println ("registering " + aObjectViewClass); maViewTemplates.add(aObjectViewClass); diff --git a/toolkit/test/accessibility/ov/StateSetView.java b/toolkit/test/accessibility/ov/StateSetView.java index f967f71d18cb..f3e4ddfd9307 100644 --- a/toolkit/test/accessibility/ov/StateSetView.java +++ b/toolkit/test/accessibility/ov/StateSetView.java @@ -60,7 +60,7 @@ public class StateSetView return aView; } - public StateSetView (ObjectViewContainer aContainer) + private StateSetView (ObjectViewContainer aContainer) { super (aContainer); @@ -124,7 +124,7 @@ public class StateSetView -public static class StateSetAllView +private static class StateSetAllView extends StateSetView { /** Create a FocusView when the given object supports the @@ -140,7 +140,7 @@ public static class StateSetAllView return null; } - public StateSetAllView (ObjectViewContainer aContainer) + private StateSetAllView (ObjectViewContainer aContainer) { super (aContainer); @@ -217,7 +217,7 @@ public static class StateSetAllView } -public static class StateSetSetView +private static class StateSetSetView extends StateSetView { static public ObjectView Create ( @@ -230,7 +230,7 @@ public static class StateSetSetView return null; } - public StateSetSetView (ObjectViewContainer aContainer) + private StateSetSetView (ObjectViewContainer aContainer) { super (aContainer); diff --git a/toolkit/test/accessibility/ov/TextView.java b/toolkit/test/accessibility/ov/TextView.java index 9962645b5180..7edb8c0109aa 100644 --- a/toolkit/test/accessibility/ov/TextView.java +++ b/toolkit/test/accessibility/ov/TextView.java @@ -47,7 +47,7 @@ public class TextView } - public TextView (ObjectViewContainer aContainer) + private TextView (ObjectViewContainer aContainer) { super (aContainer); |