diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-08 12:44:57 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-13 08:49:23 +0200 |
commit | 68cd011c907d00493bf2bfde531c1e244819596b (patch) | |
tree | 0225318c908b00faaa701a19aaf7aa567c3582a0 /odk | |
parent | 70f56bc22fe952c75ec714e05e1bb5296491a36a (diff) |
java: reduce scope, make some methods private
found by UCDetector
Change-Id: Ib1425edde146193a65c242dc159b7e3fbf0e4a2e
Diffstat (limited to 'odk')
37 files changed, 132 insertions, 132 deletions
diff --git a/odk/examples/DevelopersGuide/Charts/Helper.java b/odk/examples/DevelopersGuide/Charts/Helper.java index 725cccfb220e..0bad5c5e7588 100644 --- a/odk/examples/DevelopersGuide/Charts/Helper.java +++ b/odk/examples/DevelopersGuide/Charts/Helper.java @@ -102,7 +102,7 @@ public class Helper - public XModel createDocument( String sDocType ) + private XModel createDocument( String sDocType ) { XModel aResult = null; try diff --git a/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java b/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java index c320cc3455b4..65c6b5301302 100644 --- a/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java +++ b/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java @@ -218,7 +218,7 @@ public class DialogComponent { * static component initialisation functions as well as in * getSupportedServiceNames. */ - public static String[] getServiceNames() { + private static String[] getServiceNames() { String[] sSupportedServiceNames = { __serviceName }; return sSupportedServiceNames; } @@ -239,7 +239,7 @@ public class DialogComponent { return _DialogComponent.class.getName(); } - public void showMessageBox(String sTitle, String sMessage) { + private void showMessageBox(String sTitle, String sMessage) { if ( null != m_xFrame && null != m_xToolkit ) { // describe window properties. diff --git a/odk/examples/DevelopersGuide/Database/RowSet.java b/odk/examples/DevelopersGuide/Database/RowSet.java index c19dcdc681b7..9b67a5078613 100644 --- a/odk/examples/DevelopersGuide/Database/RowSet.java +++ b/odk/examples/DevelopersGuide/Database/RowSet.java @@ -86,7 +86,7 @@ public class RowSet System.out.println(aNames[i]); } - public static void useRowSet() throws com.sun.star.uno.Exception + private static void useRowSet() throws com.sun.star.uno.Exception { // first we create our RowSet object XRowSet xRowRes = UnoRuntime.queryInterface( @@ -109,7 +109,7 @@ public class RowSet System.out.println("RowSet destroyed!"); } - public static void showRowSetPrivileges() throws com.sun.star.uno.Exception + private static void showRowSetPrivileges() throws com.sun.star.uno.Exception { // first we create our RowSet object XRowSet xRowRes = UnoRuntime.queryInterface( @@ -143,7 +143,7 @@ public class RowSet System.out.println("RowSet destroyed!"); } - public static void showRowSetRowCount() throws com.sun.star.uno.Exception + private static void showRowSetRowCount() throws com.sun.star.uno.Exception { // first we create our RowSet object XRowSet xRowRes = UnoRuntime.queryInterface( @@ -175,7 +175,7 @@ public class RowSet System.out.println("RowSet destroyed!"); } - public static void showRowSetEvents() throws com.sun.star.uno.Exception + private static void showRowSetEvents() throws com.sun.star.uno.Exception { // first we create our RowSet object XRowSet xRowRes = UnoRuntime.queryInterface( diff --git a/odk/examples/DevelopersGuide/Database/Sales.java b/odk/examples/DevelopersGuide/Database/Sales.java index 12f68e9f6b45..a18b0cd85745 100644 --- a/odk/examples/DevelopersGuide/Database/Sales.java +++ b/odk/examples/DevelopersGuide/Database/Sales.java @@ -142,7 +142,7 @@ public class Sales } // inserts a row programmatically. - public void insertRow() throws com.sun.star.uno.Exception + private void insertRow() throws com.sun.star.uno.Exception { // example for a programmatic way to do updates. XStatement stmt = con.createStatement(); @@ -170,7 +170,7 @@ public class Sales } // deletes a row programmatically. - public void deleteRow() throws com.sun.star.uno.Exception + private void deleteRow() throws com.sun.star.uno.Exception { // example for a programmatic way to do updates. XStatement stmt = con.createStatement(); diff --git a/odk/examples/DevelopersGuide/Forms/ControlLock.java b/odk/examples/DevelopersGuide/Forms/ControlLock.java index 665eecc8d9a1..2663cd52f00f 100644 --- a/odk/examples/DevelopersGuide/Forms/ControlLock.java +++ b/odk/examples/DevelopersGuide/Forms/ControlLock.java @@ -130,7 +130,7 @@ class ControlLock implements XRowSetListener /* ------------------------------------------------------------------ */ /** updates the locks on the affected controls */ - protected void updateLocks( ) + private void updateLocks( ) { try { diff --git a/odk/examples/DevelopersGuide/Forms/DocumentBasedExample.java b/odk/examples/DevelopersGuide/Forms/DocumentBasedExample.java index fbb1933387aa..b59e5d482456 100644 --- a/odk/examples/DevelopersGuide/Forms/DocumentBasedExample.java +++ b/odk/examples/DevelopersGuide/Forms/DocumentBasedExample.java @@ -115,7 +115,7 @@ public abstract class DocumentBasedExample implements com.sun.star.lang.XEventLi /* ------------------------------------------------------------------ */ /** collect the RuntimeArguments */ - protected void collectParameters(String argv[]) + private void collectParameters(String argv[]) { // not interested in. Derived classes may want to use it. } diff --git a/odk/examples/DevelopersGuide/Forms/DocumentHelper.java b/odk/examples/DevelopersGuide/Forms/DocumentHelper.java index 6b9518631396..ec772949cfc4 100644 --- a/odk/examples/DevelopersGuide/Forms/DocumentHelper.java +++ b/odk/examples/DevelopersGuide/Forms/DocumentHelper.java @@ -120,7 +120,7 @@ public class DocumentHelper The initial name of the form. May be null, in this case the default (which is an implementation detail) applies. */ - protected XIndexContainer createSubForm( XIndexContainer xParentContainer, String sInitialName ) + private XIndexContainer createSubForm( XIndexContainer xParentContainer, String sInitialName ) throws com.sun.star.uno.Exception { // create a new form @@ -196,7 +196,7 @@ public class DocumentHelper /* ------------------------------------------------------------------ */ /** returns a URL which can be used to create a document of a certain type */ - public static String getDocumentFactoryURL( DocumentType eType ) + private static String getDocumentFactoryURL( DocumentType eType ) { if ( eType == DocumentType.WRITER ) return "private:factory/swriter"; diff --git a/odk/examples/DevelopersGuide/Forms/DocumentViewHelper.java b/odk/examples/DevelopersGuide/Forms/DocumentViewHelper.java index ca4f437530f8..75948937b448 100644 --- a/odk/examples/DevelopersGuide/Forms/DocumentViewHelper.java +++ b/odk/examples/DevelopersGuide/Forms/DocumentViewHelper.java @@ -69,7 +69,7 @@ class DocumentViewHelper @param aInterfaceClass the class of the interface which shall be returned */ - public <T> T get( Class<T> aInterfaceClass ) + private <T> T get( Class<T> aInterfaceClass ) { return UnoRuntime.queryInterface( aInterfaceClass, m_controller ); } @@ -83,7 +83,7 @@ class DocumentViewHelper @return the dispatcher for the URL in question */ - public XDispatch getDispatcher( URL[] aURL ) throws java.lang.Exception + private XDispatch getDispatcher( URL[] aURL ) throws java.lang.Exception { XDispatch xReturn = null; @@ -130,7 +130,7 @@ class DocumentViewHelper @return the control tied to the model */ - public XControl getFormControl( XControlModel xModel ) throws com.sun.star.uno.Exception + private XControl getFormControl( XControlModel xModel ) throws com.sun.star.uno.Exception { // the current view of the document XControlAccess xCtrlAcc = get( XControlAccess.class ); diff --git a/odk/examples/DevelopersGuide/Forms/FLTools.java b/odk/examples/DevelopersGuide/Forms/FLTools.java index e04500aa43d6..614d72790d27 100644 --- a/odk/examples/DevelopersGuide/Forms/FLTools.java +++ b/odk/examples/DevelopersGuide/Forms/FLTools.java @@ -76,7 +76,7 @@ public class FLTools /* ------------------------------------------------------------------ */ /** returns the name of the given form component */ - public static String getName( Object aFormComponent ) + private static String getName( Object aFormComponent ) { XNamed xNamed = UnoRuntime.queryInterface( XNamed.class, aFormComponent ); @@ -159,7 +159,7 @@ public class FLTools /* ------------------------------------------------------------------ */ /** retrieves the parent of the given object */ - static <T> T getParent( Object aComponent, Class<T> aInterfaceClass ) + private static <T> T getParent( Object aComponent, Class<T> aInterfaceClass ) { XChild xAsChild = UnoRuntime.queryInterface( XChild.class, aComponent ); diff --git a/odk/examples/DevelopersGuide/Forms/HsqlDatabase.java b/odk/examples/DevelopersGuide/Forms/HsqlDatabase.java index 5c15718706a7..29593b04cbae 100644 --- a/odk/examples/DevelopersGuide/Forms/HsqlDatabase.java +++ b/odk/examples/DevelopersGuide/Forms/HsqlDatabase.java @@ -98,7 +98,7 @@ public class HsqlDatabase * the ownership of the connection, so you don't need to (and should not) dispose/close it. * */ - public XConnection defaultConnection() throws SQLException + private XConnection defaultConnection() throws SQLException { if ( m_connection != null ) return m_connection; @@ -131,7 +131,7 @@ public class HsqlDatabase * Any CloseVetoExceptions fired by third parties are ignored, and any reference to the * database document is released. */ - public void close() + private void close() { // close connection XCloseable closeConn = UnoRuntime.queryInterface( XCloseable.class, @@ -166,7 +166,7 @@ public class HsqlDatabase /** closes the document, and deletes the underlying file */ - public void closeAndDelete() + private void closeAndDelete() { close(); diff --git a/odk/examples/DevelopersGuide/Forms/KeyGenerator.java b/odk/examples/DevelopersGuide/Forms/KeyGenerator.java index 440fc4406c1b..2e00c842ce81 100644 --- a/odk/examples/DevelopersGuide/Forms/KeyGenerator.java +++ b/odk/examples/DevelopersGuide/Forms/KeyGenerator.java @@ -54,7 +54,7 @@ class UniqueColumnValue themself are based on one table.<br/> Everything else (especially forms based on queries) is not yet implemented.</p> */ - protected String extractTableName( XPropertySet xForm ) throws com.sun.star.uno.Exception + private String extractTableName( XPropertySet xForm ) throws com.sun.star.uno.Exception { String sReturn; @@ -99,7 +99,7 @@ class UniqueColumnValue a String which can be used as statement to retrieve a unique value for the given column. The result set resulting from such a execution contains the value in it's first column. */ - protected String composeUniqueyKeyStatement( XPropertySet xForm, String sFieldName ) throws com.sun.star.uno.Exception + private String composeUniqueyKeyStatement( XPropertySet xForm, String sFieldName ) throws com.sun.star.uno.Exception { String sStatement = new String( "SELECT MAX( " ); sStatement += sFieldName; @@ -123,7 +123,7 @@ class UniqueColumnValue @param sFieldName the name of the column */ - protected int generatePrimaryKey( XPropertySet xForm, String sFieldName ) throws com.sun.star.uno.Exception + private int generatePrimaryKey( XPropertySet xForm, String sFieldName ) throws com.sun.star.uno.Exception { // get the current connection of the form XConnection xConn = UnoRuntime.queryInterface( @@ -202,7 +202,7 @@ class KeyGeneratorForReset extends UniqueColumnValue implements XResetListener /** sets the focus to the first control which is no fixed text, and not the one we're defaulting */ - public void defaultNewRecordFocus( XPropertySet xForm ) throws com.sun.star.uno.Exception + private void defaultNewRecordFocus( XPropertySet xForm ) throws com.sun.star.uno.Exception { XIndexAccess xFormAsContainer = UnoRuntime.queryInterface( XIndexAccess.class, xForm ); diff --git a/odk/examples/DevelopersGuide/Forms/SalesFilter.java b/odk/examples/DevelopersGuide/Forms/SalesFilter.java index 6aae1a05f6aa..aad8b13b106b 100644 --- a/odk/examples/DevelopersGuide/Forms/SalesFilter.java +++ b/odk/examples/DevelopersGuide/Forms/SalesFilter.java @@ -121,7 +121,7 @@ class SalesFilter implements XActionListener, XPropertyChangeListener, XResetLis = helper ================================================================== */ /* ------------------------------------------------------------------ */ - protected void initFilterDates() + private void initFilterDates() { m_aFilterDates.clear(); java.util.Date aNowAndHere = new java.util.Date(); @@ -162,7 +162,7 @@ class SalesFilter implements XActionListener, XPropertyChangeListener, XResetLis /** translates a date from the AWT Toolkit format to a java.util.date, or vice versa. */ - protected Object translateDate( Object aDate ) throws java.lang.Exception + private Object translateDate( Object aDate ) throws java.lang.Exception { Object aReturn = null; @@ -201,7 +201,7 @@ class SalesFilter implements XActionListener, XPropertyChangeListener, XResetLis /** translates the given date into the ODBC date notation, which then can be used for setting a filter at a row set */ - protected String getOdbcDate( Object aDate ) throws java.lang.Exception + private String getOdbcDate( Object aDate ) throws java.lang.Exception { String sOdbcDate = ""; if ( null != aDate ) @@ -235,7 +235,7 @@ class SalesFilter implements XActionListener, XPropertyChangeListener, XResetLis } /* ------------------------------------------------------------------ */ - protected void updateApplyButton() + private void updateApplyButton() { try { @@ -251,7 +251,7 @@ class SalesFilter implements XActionListener, XPropertyChangeListener, XResetLis /* ------------------------------------------------------------------ */ /** creates a normalized calendar object from the given java.util.Date */ - protected GregorianCalendar getCalendarObject( java.util.Date aDate ) + private GregorianCalendar getCalendarObject( java.util.Date aDate ) { // the date part GregorianCalendar aReturn = null; @@ -270,7 +270,7 @@ class SalesFilter implements XActionListener, XPropertyChangeListener, XResetLis } /* ------------------------------------------------------------------ */ - final protected short getCurrentSelectedFilter( ) throws com.sun.star.uno.Exception + final private short getCurrentSelectedFilter( ) throws com.sun.star.uno.Exception { short[] aSelected = (short[])m_xFilterList.getPropertyValue( "SelectedItems" ); if ( 0 < aSelected.length ) @@ -282,13 +282,13 @@ class SalesFilter implements XActionListener, XPropertyChangeListener, XResetLis /** checks if the given filter index referes to the "<other>" entry which allows the user to manually enter a date */ - final protected boolean isManualFilter( short nFilterIndex ) + final private boolean isManualFilter( short nFilterIndex ) { return ( 5 == nFilterIndex ); } /* ------------------------------------------------------------------ */ - protected void updateFilterControl() + private void updateFilterControl() { try { @@ -336,7 +336,7 @@ class SalesFilter implements XActionListener, XPropertyChangeListener, XResetLis seems to always return false, as well as . Thus here is a method which compare two calendars, restricted to their date part</p> */ - protected boolean equalDate( Calendar aLHS, Calendar aRHS ) + private boolean equalDate( Calendar aLHS, Calendar aRHS ) { if ( ( null == aLHS ) != ( null == aRHS ) ) // only one of them is null @@ -356,7 +356,7 @@ class SalesFilter implements XActionListener, XPropertyChangeListener, XResetLis @return the index of the newly added date filter in the filter list */ - protected short addCurrentFilter( ) throws java.lang.Exception + private short addCurrentFilter( ) throws java.lang.Exception { // the current string items String[] aOldFilterItems = (String[])m_xFilterList.getPropertyValue( "StringItemList" ); @@ -405,7 +405,7 @@ class SalesFilter implements XActionListener, XPropertyChangeListener, XResetLis } /* ------------------------------------------------------------------ */ - protected void executeCurrentFilter() + private void executeCurrentFilter() { try { diff --git a/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java b/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java index fc67ea18c166..345c70b59c2e 100644 --- a/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java +++ b/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java @@ -188,7 +188,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis } - public XNameAccess getRegistryKeyContent(String _sKeyName){ + private XNameAccess getRegistryKeyContent(String _sKeyName){ try { PropertyValue[] aNodePath = new PropertyValue[1]; XMultiServiceFactory xMSFConfig = theDefaultProvider.get(m_xContext); @@ -310,7 +310,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis * dialog, using the given * peer as a parent. */ - public XWindowPeer createWindowPeer(XWindowPeer _xWindowParentPeer) { + private XWindowPeer createWindowPeer(XWindowPeer _xWindowParentPeer) { try{ if (_xWindowParentPeer == null){ XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, m_xDlgContainer); @@ -371,7 +371,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis } - public XFixedText insertFixedText(XMouseListener _xMouseListener, int _nPosX, int _nPosY, int _nWidth, int _nStep, String _sLabel){ + private XFixedText insertFixedText(XMouseListener _xMouseListener, int _nPosX, int _nPosY, int _nWidth, int _nStep, String _sLabel){ XFixedText xFixedText = null; try{ // create a unique name by means of an own implementation... @@ -414,7 +414,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis } - public XTextComponent insertCurrencyField(XTextListener _xTextListener, int _nPositionX, int _nPositionY, int _nWidth){ + private XTextComponent insertCurrencyField(XTextListener _xTextListener, int _nPositionX, int _nPositionY, int _nWidth){ XTextComponent xTextComponent = null; try{ // create a unique name by means of an own implementation... @@ -460,7 +460,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis - public XPropertySet insertProgressBar(int _nPosX, int _nPosY, int _nWidth, int _nProgressMax){ + private XPropertySet insertProgressBar(int _nPosX, int _nPosY, int _nWidth, int _nProgressMax){ XPropertySet xPBModelPSet = null; try{ // create a unique name by means of an own implementation... @@ -537,7 +537,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis - public void insertGroupBox(int _nPosX, int _nPosY, int _nHeight, int _nWidth){ + private void insertGroupBox(int _nPosX, int _nPosY, int _nHeight, int _nWidth){ try{ // create a unique name by means of an own implementation... String sName = createUniqueName(m_xDlgModelNameContainer, "FrameControl"); @@ -574,7 +574,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis - public XTextComponent insertEditField(XTextListener _xTextListener, XFocusListener _xFocusListener, int _nPosX, int _nPosY, int _nWidth){ + private XTextComponent insertEditField(XTextListener _xTextListener, XFocusListener _xFocusListener, int _nPosX, int _nPosY, int _nWidth){ XTextComponent xTextComponent = null; try{ // create a unique name by means of an own implementation... @@ -619,7 +619,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis return xTextComponent; } - public XPropertySet insertTimeField(int _nPosX, int _nPosY, int _nWidth, Time _aTime, Time _aTimeMin, Time _aTimeMax){ + private XPropertySet insertTimeField(int _nPosX, int _nPosY, int _nWidth, Time _aTime, Time _aTimeMin, Time _aTimeMax){ XPropertySet xTFModelPSet = null; try{ // create a unique name by means of an own implementation... @@ -661,7 +661,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis - public XPropertySet insertDateField(XSpinListener _xSpinListener, int _nPosX, int _nPosY, int _nWidth){ + private XPropertySet insertDateField(XSpinListener _xSpinListener, int _nPosX, int _nPosY, int _nWidth){ XPropertySet xDFModelPSet = null; try{ // create a unique name by means of an own implementation... @@ -707,7 +707,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis } - public XPropertySet insertPatternField(int _nPosX, int _nPosY, int _nWidth){ + private XPropertySet insertPatternField(int _nPosX, int _nPosY, int _nWidth){ XPropertySet xPFModelPSet = null; try{ // create a unique name by means of an own implementation... @@ -749,7 +749,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis } - public XPropertySet insertNumericField( int _nPosX, int _nPosY, int _nWidth, + private XPropertySet insertNumericField( int _nPosX, int _nPosY, int _nWidth, double _fValueMin, double _fValueMax, double _fValue, double _fValueStep, short _nDecimalAccuracy){ XPropertySet xNFModelPSet = null; @@ -793,7 +793,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis - public XPropertySet insertVerticalScrollBar(XAdjustmentListener _xAdjustmentListener, int _nPosX, int _nPosY, int _nHeight){ + private XPropertySet insertVerticalScrollBar(XAdjustmentListener _xAdjustmentListener, int _nPosX, int _nPosY, int _nHeight){ XPropertySet xSBModelPSet = null; try{ // create a unique name by means of an own implementation... @@ -861,7 +861,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis } - public XCheckBox insertCheckBox(XItemListener _xItemListener, int _nPosX, int _nPosY, int _nWidth){ + private XCheckBox insertCheckBox(XItemListener _xItemListener, int _nPosX, int _nPosY, int _nWidth){ XCheckBox xCheckBox = null; try{ // create a unique name by means of an own implementation... @@ -906,7 +906,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis - public void insertRadioButtonGroup(short _nTabIndex, int _nPosX, int _nPosY, int _nWidth){ + private void insertRadioButtonGroup(short _nTabIndex, int _nPosX, int _nPosY, int _nWidth){ try{ // create a unique name by means of an own implementation... String sName = createUniqueName(m_xDlgModelNameContainer, "OptionButton"); @@ -947,7 +947,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis } - public XListBox insertListBox(int _nPosX, int _nPosY, int _nWidth, int _nStep, String[] _sStringItemList){ + private XListBox insertListBox(int _nPosX, int _nPosY, int _nWidth, int _nStep, String[] _sStringItemList){ XListBox xListBox = null; try{ // create a unique name by means of an own implementation... @@ -987,7 +987,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis } - public XComboBox insertComboBox(int _nPosX, int _nPosY, int _nWidth){ + private XComboBox insertComboBox(int _nPosX, int _nPosY, int _nWidth){ XComboBox xComboBox = null; try{ // create a unique name by means of an own implementation... @@ -1032,7 +1032,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis - public XPropertySet insertFormattedField(XSpinListener _xSpinListener, int _nPosX, int _nPosY, int _nWidth){ + private XPropertySet insertFormattedField(XSpinListener _xSpinListener, int _nPosX, int _nPosY, int _nWidth){ XPropertySet xFFModelPSet = null; try{ // create a unique name by means of an own implementation... @@ -1099,7 +1099,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis } - public XTextComponent insertFileControl(XTextListener _xTextListener, int _nPosX, int _nPosY, int _nWidth){ + private XTextComponent insertFileControl(XTextListener _xTextListener, int _nPosX, int _nPosY, int _nWidth){ XTextComponent xTextComponent = null; try{ // create a unique name by means of an own implementation... diff --git a/odk/examples/DevelopersGuide/GUI/UnoMenu.java b/odk/examples/DevelopersGuide/GUI/UnoMenu.java index 8f915bdb2761..dcedef25482c 100644 --- a/odk/examples/DevelopersGuide/GUI/UnoMenu.java +++ b/odk/examples/DevelopersGuide/GUI/UnoMenu.java @@ -90,7 +90,7 @@ public UnoMenu(XComponentContext _xContext, XMultiComponentFactory _xMCF) { } - public void addMenuBar(XTopWindow _xTopWindow, XMenuListener _xMenuListener){ + private void addMenuBar(XTopWindow _xTopWindow, XMenuListener _xMenuListener){ try{ // create a menubar at the global MultiComponentFactory... Object oMenuBar = m_xMCF.createInstanceWithContext("com.sun.star.awt.MenuBar", m_xContext); @@ -115,7 +115,7 @@ public UnoMenu(XComponentContext _xContext, XMultiComponentFactory _xMCF) { System.exit( 0 ); } - public XTopWindow showTopWindow( Rectangle _aRectangle){ + private XTopWindow showTopWindow( Rectangle _aRectangle){ XTopWindow xTopWindow = null; try { // The Toolkit is the creator of all windows... diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/DocumentView.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/DocumentView.java index 92dcacbab235..002c6442974f 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/DocumentView.java +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/DocumentView.java @@ -271,7 +271,7 @@ public class DocumentView extends JFrame - public void save() + private void save() { com.sun.star.frame.XController xController = mxFrame.getController(); if (xController==null) @@ -284,7 +284,7 @@ public class DocumentView extends JFrame - public void exportHTML(String sURL) + private void exportHTML(String sURL) { com.sun.star.frame.XController xController = mxFrame.getController(); if (xController==null) diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Interceptor.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Interceptor.java index af180b8cbfbe..77b48abb99e4 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Interceptor.java +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Interceptor.java @@ -291,7 +291,7 @@ public class Interceptor implements com.sun.star.frame.XFrameActionListener, * @param aEvent * describes the action */ - public void impl_frameAction(/*IN*/ com.sun.star.frame.FrameActionEvent aEvent) + private void impl_frameAction(/*IN*/ com.sun.star.frame.FrameActionEvent aEvent) { synchronized(this) { @@ -491,7 +491,7 @@ public class Interceptor implements com.sun.star.frame.XFrameActionListener, * @param lArguments * optional arguments for loading */ - public void impl_dispatch(/*IN*/ com.sun.star.util.URL aURL,/*IN*/ com.sun.star.beans.PropertyValue[] lArguments) + private void impl_dispatch(/*IN*/ com.sun.star.util.URL aURL,/*IN*/ com.sun.star.beans.PropertyValue[] lArguments) { synchronized(this) { diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/StatusListener.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/StatusListener.java index 7b409921ec11..317022d8190c 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/StatusListener.java +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/StatusListener.java @@ -316,7 +316,7 @@ class StatusListener implements com.sun.star.frame.XStatusListener, * @param aEvent * describes the action */ - public void impl_frameAction(/*IN*/ com.sun.star.frame.FrameActionEvent aEvent) + private void impl_frameAction(/*IN*/ com.sun.star.frame.FrameActionEvent aEvent) { synchronized(this) { diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/ViewContainer.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/ViewContainer.java index 9bc3e57e83ef..fdc82ea24e6d 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/ViewContainer.java +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/ViewContainer.java @@ -174,7 +174,7 @@ public class ViewContainer extends Thread - public void removeListener( IShutdownListener rListener ) + private void removeListener( IShutdownListener rListener ) { synchronized(mlListener) { diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/FilterOptions.java b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/FilterOptions.java index da283d365b98..5d6e9a3dda5b 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/FilterOptions.java +++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/FilterOptions.java @@ -114,7 +114,7 @@ public class FilterOptions * @param lDescriptor * the new MediaDescriptor to set internal member from it */ - public void analyze( boolean bImport , + private void analyze( boolean bImport , com.sun.star.beans.PropertyValue[] lDescriptor ) { m_xInput = null ; diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper.java index 2352ff8cceeb..c1ab8438467b 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper.java +++ b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper.java @@ -114,7 +114,7 @@ public class PropChgHelper implements } } - public void RemoveAsListener() + private void RemoveAsListener() { if (xPropSet != null) { diff --git a/odk/examples/DevelopersGuide/UCB/DataStreamRetriever.java b/odk/examples/DevelopersGuide/UCB/DataStreamRetriever.java index 9865734d1e35..95fb3e98413a 100644 --- a/odk/examples/DevelopersGuide/UCB/DataStreamRetriever.java +++ b/odk/examples/DevelopersGuide/UCB/DataStreamRetriever.java @@ -117,7 +117,7 @@ public class DataStreamRetriever { * *@param args Arguments */ - public void parseArguments( String[] args ) throws java.lang.Exception { + private void parseArguments( String[] args ) throws java.lang.Exception { for ( int i = 0; i < args.length; i++ ) { if ( args[i].startsWith( "-url=" )) { @@ -137,7 +137,7 @@ public class DataStreamRetriever { /** * Print the commands options */ - public void printCmdLineUsage() { + private void printCmdLineUsage() { System.out.println( "Usage : DataStreamRetriever -url=..." ); System.out.println( @@ -149,7 +149,7 @@ public class DataStreamRetriever { /** * Print Stream content. */ - public void printStream( XInputStream data ) + private void printStream( XInputStream data ) throws com.sun.star.uno.Exception { diff --git a/odk/examples/DevelopersGuide/UCB/Helper.java b/odk/examples/DevelopersGuide/UCB/Helper.java index fe427a902930..015e6976e264 100644 --- a/odk/examples/DevelopersGuide/UCB/Helper.java +++ b/odk/examples/DevelopersGuide/UCB/Helper.java @@ -93,7 +93,7 @@ public class Helper { *@param connectURL Connect URL. Example : -url=file:/// *@return Created identifier object for given URL */ - public XContent createUCBContent( String connectURL ) throws java.lang.Exception { + private XContent createUCBContent( String connectURL ) throws java.lang.Exception { XContent content = null; if ( connectURL != null && !connectURL.equals( "" )) { diff --git a/odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObject.java b/odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObject.java index 059526184202..80a09136986b 100644 --- a/odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObject.java +++ b/odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObject.java @@ -66,7 +66,7 @@ public final class OwnEmbeddedObject extends WeakBase private Dimension m_aObjSize; - protected ArrayList<Object> GetListeners() + private ArrayList<Object> GetListeners() { if ( m_aListeners == null ) m_aListeners = new ArrayList<Object>(10); @@ -75,7 +75,7 @@ public final class OwnEmbeddedObject extends WeakBase } - protected Dimension UpdateSizeAndGetFromActive() + private Dimension UpdateSizeAndGetFromActive() { if ( m_nObjectState == com.sun.star.embed.EmbedStates.ACTIVE ) m_aObjSize = m_aEditorFrame.getAppSize(); @@ -87,7 +87,7 @@ public final class OwnEmbeddedObject extends WeakBase } - protected void SwitchOwnPersistence( XStorage xParentStorage, XStorage xOwnStorage, String aEntryName ) + private void SwitchOwnPersistence( XStorage xParentStorage, XStorage xOwnStorage, String aEntryName ) { if ( xOwnStorage != m_xOwnStorage ) { @@ -100,7 +100,7 @@ public final class OwnEmbeddedObject extends WeakBase } - protected void SwitchOwnPersistence( XStorage xParentStorage, String aEntryName ) throws com.sun.star.io.IOException + private void SwitchOwnPersistence( XStorage xParentStorage, String aEntryName ) throws com.sun.star.io.IOException { if ( xParentStorage != m_xParentStorage || !aEntryName.equals( m_aEntryName ) ) { @@ -125,7 +125,7 @@ public final class OwnEmbeddedObject extends WeakBase } - protected static void SaveDataToStorage( XStorage xStorage, String aString, Dimension aDimension ) throws com.sun.star.io.IOException + private static void SaveDataToStorage( XStorage xStorage, String aString, Dimension aDimension ) throws com.sun.star.io.IOException { try { @@ -185,7 +185,7 @@ public final class OwnEmbeddedObject extends WeakBase } - protected void PostEvent( String aEvEntryName ) + private void PostEvent( String aEvEntryName ) { if ( m_aListeners != null ) { @@ -208,7 +208,7 @@ public final class OwnEmbeddedObject extends WeakBase } - protected void StateChangeNotification( boolean bBeforeChange, int nOldState, int nNewState ) + private void StateChangeNotification( boolean bBeforeChange, int nOldState, int nNewState ) { if ( m_aListeners != null ) { @@ -236,7 +236,7 @@ public final class OwnEmbeddedObject extends WeakBase } - protected String ReadStringFromStream( XStorage xStorage, String aStreamName ) throws com.sun.star.io.IOException + private String ReadStringFromStream( XStorage xStorage, String aStreamName ) throws com.sun.star.io.IOException { if ( xStorage == null ) throw new com.sun.star.uno.RuntimeException(); @@ -281,7 +281,7 @@ public final class OwnEmbeddedObject extends WeakBase } - protected void ReadSizeFromOwnStorage() throws com.sun.star.io.IOException + private void ReadSizeFromOwnStorage() throws com.sun.star.io.IOException { String aSize = ReadStringFromStream( m_xOwnStorage, "properties.txt" ); diff --git a/odk/examples/java/Inspector/HideableTreeModel.java b/odk/examples/java/Inspector/HideableTreeModel.java index 0184e24b8aed..7add3d723cd7 100644 --- a/odk/examples/java/Inspector/HideableTreeModel.java +++ b/odk/examples/java/Inspector/HideableTreeModel.java @@ -44,12 +44,12 @@ public class HideableTreeModel implements TreeModel { } - protected void setRoot(Object r) { + private void setRoot(Object r) { this.root = r; } - public Object[] getPathToRoot(Object node) { + private Object[] getPathToRoot(Object node) { return getPathToRoot(node, 0); } @@ -89,7 +89,7 @@ public class HideableTreeModel implements TreeModel { } - public void reload(Object node) { + private void reload(Object node) { if(node != null) { TreePath tp = new TreePath(getPathToRoot(node)); fireTreeStructureChanged(new TreeModelEvent(this, tp)); @@ -119,7 +119,7 @@ public class HideableTreeModel implements TreeModel { } - public void nodeRemoved(Object node, Object child, int index) { + private void nodeRemoved(Object node, Object child, int index) { if(node != null && child != null && index >= 0) { TreePath tp = new TreePath(getPathToRoot(node)); int[] ai = { index }; @@ -137,27 +137,27 @@ public class HideableTreeModel implements TreeModel { } - protected void fireTreeNodesChanged(TreeModelEvent event) { + private void fireTreeNodesChanged(TreeModelEvent event) { for(TreeModelListener l : modelListeners) { l.treeNodesChanged(event); } } - protected void fireTreeNodesInserted(TreeModelEvent event) { + private void fireTreeNodesInserted(TreeModelEvent event) { for(TreeModelListener l : modelListeners) { l.treeNodesInserted(event); } } - protected void fireTreeNodesRemoved(TreeModelEvent event) { + private void fireTreeNodesRemoved(TreeModelEvent event) { for(TreeModelListener l : modelListeners) { l.treeNodesRemoved(event); } } - protected void fireTreeStructureChanged(TreeModelEvent event) { + private void fireTreeStructureChanged(TreeModelEvent event) { for(TreeModelListener l : modelListeners) { l.treeStructureChanged(event); } @@ -197,7 +197,7 @@ public class HideableTreeModel implements TreeModel { - public Object getParent(Object node) { + private Object getParent(Object node) { if(node != getRoot() && (node instanceof TreeNode)) { return ((TreeNode)node).getParent(); } @@ -205,7 +205,7 @@ public class HideableTreeModel implements TreeModel { } - public boolean isNodeVisible(Object node) { + private boolean isNodeVisible(Object node) { if(node != getRoot()) { if(node instanceof HideableMutableTreeNode) { return ((HideableMutableTreeNode)node).isVisible(); diff --git a/odk/examples/java/Inspector/Inspector.java b/odk/examples/java/Inspector/Inspector.java index 80fc6598d888..a537d9c77941 100644 --- a/odk/examples/java/Inspector/Inspector.java +++ b/odk/examples/java/Inspector/Inspector.java @@ -111,7 +111,7 @@ public class Inspector{ } - protected String getSDKPath(){ + private String getSDKPath(){ String sRetPath = ""; try{ XNameAccess xNameAccess = getConfigurationAccess("org.openoffice.inspector.ObjectInspector", true); @@ -184,7 +184,7 @@ public class Inspector{ }} - public void showErrorMessageBox(XWindowPeer _xWindowPeer, String _sTitle, String _sMessage){ + private void showErrorMessageBox(XWindowPeer _xWindowPeer, String _sTitle, String _sMessage){ try { Object oToolkit = m_xComponentContext.getServiceManager().createInstanceWithContext("com.sun.star.awt.Toolkit", m_xComponentContext); XMessageBoxFactory xMessageBoxFactory = UnoRuntime.queryInterface(XMessageBoxFactory.class, oToolkit); @@ -336,7 +336,7 @@ public class Inspector{ } - public static String[] getServiceNames() { + private static String[] getServiceNames() { String[] sSupportedServiceNames = { __serviceName }; return sSupportedServiceNames; } @@ -391,12 +391,12 @@ public class Inspector{ } - public XNameAccess getConfigurationAccess(boolean _bUpdate){ + private XNameAccess getConfigurationAccess(boolean _bUpdate){ return getConfigurationAccess("org.openoffice.inspector.ObjectInspector", _bUpdate); } - public XNameAccess getConfigurationAccess(String _sNodePath, boolean update) { + private XNameAccess getConfigurationAccess(String _sNodePath, boolean update) { XNameAccess xNameAccess = null; try { String sAccess = ""; diff --git a/odk/examples/java/Inspector/InspectorAddon.java b/odk/examples/java/Inspector/InspectorAddon.java index 3846085d2521..fee4f1dcbd4d 100644 --- a/odk/examples/java/Inspector/InspectorAddon.java +++ b/odk/examples/java/Inspector/InspectorAddon.java @@ -150,7 +150,7 @@ public class InspectorAddon { } - public static String[] getServiceNames() { + private static String[] getServiceNames() { return m_serviceNames; } diff --git a/odk/examples/java/Inspector/InspectorPane.java b/odk/examples/java/Inspector/InspectorPane.java index 27cbf50b1d8e..eae2195468cb 100644 --- a/odk/examples/java/Inspector/InspectorPane.java +++ b/odk/examples/java/Inspector/InspectorPane.java @@ -234,7 +234,7 @@ import com.sun.star.uno.XComponentContext; - public void addMethodsToTreeNode(XUnoNode _oGrandParentNode, Object _oUnoParentObject, XIdlMethod[] _xIdlMethods){ + private void addMethodsToTreeNode(XUnoNode _oGrandParentNode, Object _oUnoParentObject, XIdlMethod[] _xIdlMethods){ if (Introspector.isValid(_xIdlMethods)){ for ( int n = 0; n < _xIdlMethods.length; n++ ) { XIdlMethod xIdlMethod = _xIdlMethods[n]; @@ -335,7 +335,7 @@ import com.sun.star.uno.XComponentContext; }} - public void addContainerElementsToTreeNode(XUnoNode _oParentNode, Object _oUnoParentObject){ + private void addContainerElementsToTreeNode(XUnoNode _oParentNode, Object _oUnoParentObject){ Object[] oUnoContainerElements = m_oIntrospector.getUnoObjectsOfContainer(_oUnoParentObject); if (Introspector.isValid(oUnoContainerElements)){ if (oUnoContainerElements.length > 0){ diff --git a/odk/examples/java/Inspector/Introspector.java b/odk/examples/java/Inspector/Introspector.java index ca335a3bfe38..e3cfc97e47d6 100644 --- a/odk/examples/java/Inspector/Introspector.java +++ b/odk/examples/java/Inspector/Introspector.java @@ -119,7 +119,7 @@ public class Introspector extends WeakBase{ } - protected XMultiComponentFactory getXMultiComponentFactory(){ + private XMultiComponentFactory getXMultiComponentFactory(){ return m_xMultiComponentFactory; } @@ -357,7 +357,7 @@ public class Introspector extends WeakBase{ } - protected void initTypeDescriptionManager() { + private void initTypeDescriptionManager() { try { Object oTypeDescriptionManager = getXComponentContext().getValueByName("/singletons/com.sun.star.reflection.theTypeDescriptionManager"); m_xTDEnumerationAccess = UnoRuntime.queryInterface(XTypeDescriptionEnumerationAccess.class, oTypeDescriptionManager); @@ -366,7 +366,7 @@ public class Introspector extends WeakBase{ }} - protected XTypeDescriptionEnumerationAccess getXTypeDescriptionEnumerationAccess(){ + private XTypeDescriptionEnumerationAccess getXTypeDescriptionEnumerationAccess(){ return m_xTDEnumerationAccess; } @@ -447,7 +447,7 @@ public class Introspector extends WeakBase{ } - public XInterfaceTypeDescription[] getInterfaceDescriptionsOfService(String _sServiceName){ + private XInterfaceTypeDescription[] getInterfaceDescriptionsOfService(String _sServiceName){ try { XServiceTypeDescription xServiceTypeDescription = getServiceTypeDescription(_sServiceName, com.sun.star.uno.TypeClass.INTERFACE); if (xServiceTypeDescription != null){ @@ -461,7 +461,7 @@ public class Introspector extends WeakBase{ } - static boolean hasByName(XTypeDescription[] _xTypeDescriptions, String _sTypeName){ + private static boolean hasByName(XTypeDescription[] _xTypeDescriptions, String _sTypeName){ for (int i = 0; i < _xTypeDescriptions.length; i++){ if (_xTypeDescriptions[i].getName().equals(_sTypeName)){ return true; @@ -508,7 +508,7 @@ public class Introspector extends WeakBase{ } - public static boolean isOfUnoType(Object _oUnoObject, String _sTypeName){ + private static boolean isOfUnoType(Object _oUnoObject, String _sTypeName){ boolean bIsUnoObject = false; if (_oUnoObject != null){ if (_oUnoObject.getClass().isArray()){ diff --git a/odk/examples/java/Inspector/MethodParametersDialog.java b/odk/examples/java/Inspector/MethodParametersDialog.java index 6181d0503420..7ce38be09647 100644 --- a/odk/examples/java/Inspector/MethodParametersDialog.java +++ b/odk/examples/java/Inspector/MethodParametersDialog.java @@ -335,7 +335,7 @@ public class MethodParametersDialog extends JDialog{ } - public void invokeParameterMethod(){ + private void invokeParameterMethod(){ try{ Object[] oParameters = getParameterValues(); m_oUnoReturnObject = m_xUnoMethodNode.invoke(m_oUnoObject, oParameters); diff --git a/odk/examples/java/Inspector/ProtocolHandlerAddon.java b/odk/examples/java/Inspector/ProtocolHandlerAddon.java index 37dfc1411c39..1515759b4000 100644 --- a/odk/examples/java/Inspector/ProtocolHandlerAddon.java +++ b/odk/examples/java/Inspector/ProtocolHandlerAddon.java @@ -118,7 +118,7 @@ public class ProtocolHandlerAddon { return getServiceNames(); } - public static String[] getServiceNames() { + private static String[] getServiceNames() { return m_serviceNames; } @@ -202,7 +202,7 @@ public class ProtocolHandlerAddon { /*IN*/com.sun.star.util.URL aURL ) { } - public void showMessageBox(String sTitle, String sMessage) { + private void showMessageBox(String sTitle, String sMessage) { if ( null != m_xFrame && null != m_xToolkit ) { // describe window properties. diff --git a/odk/examples/java/Inspector/SourceCodeGenerator.java b/odk/examples/java/Inspector/SourceCodeGenerator.java index 2ba84790ac95..165d917330cd 100644 --- a/odk/examples/java/Inspector/SourceCodeGenerator.java +++ b/odk/examples/java/Inspector/SourceCodeGenerator.java @@ -251,7 +251,7 @@ public class SourceCodeGenerator { } - public String getPropertyStatementSourceCode(XUnoPropertyNode _oUnoPropertyNode, String _sVariableName, UnoObjectDefinition _oUnoReturnObjectDefinition){ + private String getPropertyStatementSourceCode(XUnoPropertyNode _oUnoPropertyNode, String _sVariableName, UnoObjectDefinition _oUnoReturnObjectDefinition){ String sReturnObjectVariableDefinition = ""; String sStatement = ""; String sPropertyName = _oUnoPropertyNode.getProperty().Name; @@ -274,7 +274,7 @@ public class SourceCodeGenerator { } - public String getMethodStatementSourceCode(XUnoMethodNode _oUnoMethodNode, String _sVariableName, UnoObjectDefinition _oUnoReturnObjectDefinition){ + private String getMethodStatementSourceCode(XUnoMethodNode _oUnoMethodNode, String _sVariableName, UnoObjectDefinition _oUnoReturnObjectDefinition){ String sReturnObjectVariableDefinition = ""; String sStatement = ""; XIdlMethod xIdlMethod = _oUnoMethodNode.getXIdlMethod(); @@ -519,7 +519,7 @@ public class SourceCodeGenerator { } - public String getVariableInitialization(UnoObjectDefinition _oUnoObjectDefinition, boolean _bInitialize){ + private String getVariableInitialization(UnoObjectDefinition _oUnoObjectDefinition, boolean _bInitialize){ String sObjectVariableDeclaration = ""; String sVariableName = _oUnoObjectDefinition.getVariableName(); if (isVariableDeclared(_oUnoObjectDefinition, "")){ @@ -649,7 +649,7 @@ private class UnoObjectDefinition{ } - public void addParameterObjects(Object[] _oParameterObjects){ + private void addParameterObjects(Object[] _oParameterObjects){ m_oParameterObjects = _oParameterObjects; } @@ -668,7 +668,7 @@ private class UnoObjectDefinition{ } - public String getVariableStemName(TypeClass _aTypeClass){ + private String getVariableStemName(TypeClass _aTypeClass){ int nTypeClass = _aTypeClass.getValue(); switch(nTypeClass){ case TypeClass.BOOLEAN_value: diff --git a/odk/examples/java/Inspector/SwingDialogProvider.java b/odk/examples/java/Inspector/SwingDialogProvider.java index 5c33a16ac104..42ae6db387ce 100644 --- a/odk/examples/java/Inspector/SwingDialogProvider.java +++ b/odk/examples/java/Inspector/SwingDialogProvider.java @@ -91,12 +91,12 @@ public class SwingDialogProvider implements XDialogProvider{ } - public void addMenuBar(JMenuBar _jMenuBar){ + private void addMenuBar(JMenuBar _jMenuBar){ getDialog().setJMenuBar(_jMenuBar); } - public void removeTabPaneByIndex(int _nIndex){ + private void removeTabPaneByIndex(int _nIndex){ if (_nIndex > -1){ String sSelInspectorPanelTitle = m_jTabbedPane1.getTitleAt(_nIndex); m_jTabbedPane1.remove(_nIndex); @@ -136,7 +136,7 @@ public class SwingDialogProvider implements XDialogProvider{ } - public void removeTabPanes(){ + private void removeTabPanes(){ int nCount = m_jTabbedPane1.getTabCount(); if (nCount > 0){ for (int i = nCount-1; i >= 0; i--){ @@ -145,7 +145,7 @@ public class SwingDialogProvider implements XDialogProvider{ } } - public void removeSelectedTabPane(){ + private void removeSelectedTabPane(){ int nIndex = getTabbedPane().getSelectedIndex(); removeTabPaneByIndex(nIndex); } diff --git a/odk/examples/java/Inspector/TDocSupplier.java b/odk/examples/java/Inspector/TDocSupplier.java index 7f34d13de96d..9c5b8f36d54d 100644 --- a/odk/examples/java/Inspector/TDocSupplier.java +++ b/odk/examples/java/Inspector/TDocSupplier.java @@ -64,12 +64,12 @@ public class TDocSupplier { } - protected XComponentContext getXComponentContext(){ + private XComponentContext getXComponentContext(){ return m_xComponentContext; } - protected XMultiComponentFactory getXMultiComponentFactory(){ + private XMultiComponentFactory getXMultiComponentFactory(){ return m_xMultiComponentFactory; } diff --git a/odk/examples/java/Inspector/UnoNode.java b/odk/examples/java/Inspector/UnoNode.java index cd2ac16c74d9..fa48a25a9dd9 100644 --- a/odk/examples/java/Inspector/UnoNode.java +++ b/odk/examples/java/Inspector/UnoNode.java @@ -79,12 +79,12 @@ public class UnoNode{ } - protected XComponentContext getXComponentContext(){ + private XComponentContext getXComponentContext(){ return m_xComponentContext; } - protected XMultiComponentFactory getXMultiComponentFactory(){ + private XMultiComponentFactory getXMultiComponentFactory(){ return m_xMultiComponentFactory; } diff --git a/odk/examples/java/Inspector/UnoPropertyNode.java b/odk/examples/java/Inspector/UnoPropertyNode.java index cd7882110339..0417f71d16d1 100644 --- a/odk/examples/java/Inspector/UnoPropertyNode.java +++ b/odk/examples/java/Inspector/UnoPropertyNode.java @@ -120,7 +120,7 @@ public class UnoPropertyNode extends UnoNode{ - protected boolean doesServiceSupportProperty(String _sServiceName, String _sPropertyName){ + private boolean doesServiceSupportProperty(String _sServiceName, String _sPropertyName){ try { XPropertyTypeDescription[] xPropertyTypeDescriptions = Introspector.getIntrospector().getPropertyDescriptionsOfService(_sServiceName); for (int i = 0; i < xPropertyTypeDescriptions.length; i++){ @@ -188,7 +188,7 @@ public class UnoPropertyNode extends UnoNode{ return aProperty; } - protected static String getPropertyTypeDescription(Property _aProperty, Object _oUnoObject){ + private static String getPropertyTypeDescription(Property _aProperty, Object _oUnoObject){ return _aProperty.Type.getTypeName() + " " + _aProperty.Name + " = " + _oUnoObject.toString(); } diff --git a/odk/examples/java/MinimalComponent/MinimalComponent.java b/odk/examples/java/MinimalComponent/MinimalComponent.java index c96eb816999b..e0c34d4dfe83 100644 --- a/odk/examples/java/MinimalComponent/MinimalComponent.java +++ b/odk/examples/java/MinimalComponent/MinimalComponent.java @@ -107,7 +107,7 @@ public class MinimalComponent { * static component initialisation functions as well as in * getSupportedServiceNames. */ - public static String[] getServiceNames() { + private static String[] getServiceNames() { String[] sSupportedServiceNames = { __serviceName }; return sSupportedServiceNames; } diff --git a/odk/examples/java/ToDo/ToDo.java b/odk/examples/java/ToDo/ToDo.java index 2da2ded22f84..71a628316daf 100644 --- a/odk/examples/java/ToDo/ToDo.java +++ b/odk/examples/java/ToDo/ToDo.java @@ -130,7 +130,7 @@ public class ToDo { return getServiceNames(); } - public static String[] getServiceNames() { + private static String[] getServiceNames() { String[] sSupportedServiceNames = { __serviceName }; return sSupportedServiceNames; } @@ -578,7 +578,7 @@ public class ToDo { * @param gregCal Date to be converted. * @return string (converted gregorian calendar). */ - public String getStringFromGregorianCalendar( GregorianCalendar gregCal ) { + private String getStringFromGregorianCalendar( GregorianCalendar gregCal ) { String sDate = ( gregCal.get( Calendar.MONTH ) + 1 ) + STRING_SEPARATOR + gregCal.get( Calendar.DATE ) // + STRING_SEPARATOR + ( gregCal.get( Calendar.MONTH ) + 1 ) @@ -591,7 +591,7 @@ public class ToDo { * @param sDate String to be converted. * @return The result of the converting of the string. */ - public GregorianCalendar getGregorianCalendarFromString( String sDate ) { + private GregorianCalendar getGregorianCalendarFromString( String sDate ) { int []intDateValue = this.getDateValuesFromString( sDate ); return( new GregorianCalendar( intDateValue[ 2 ], intDateValue[ 0 ], @@ -602,7 +602,7 @@ public class ToDo { * @param sDate String to be parsed. * @return Returns an array of integer variables. */ - public int[] getDateValuesFromString( String sDate) { + private int[] getDateValuesFromString( String sDate) { int[] intDateValues = new int[ 3 ]; int intPositionFirstTag = sDate.indexOf( STRING_SEPARATOR ); @@ -628,7 +628,7 @@ public class ToDo { * @param intColumn Number of column. * @return String from the specified cell. */ - public String getStringFromCell( XCellRange xcellrange, int intRow, + private String getStringFromCell( XCellRange xcellrange, int intRow, int intColumn ) { XTextRange xtextrangeStartDate = null; @@ -653,7 +653,7 @@ public class ToDo { * @param intColumn Number of column. * @param sDate Date to write to the cell. */ - public void setStringToCell( XCellRange xcellrange, int intRow, + private void setStringToCell( XCellRange xcellrange, int intRow, int intColumn, String sDate ) { try { // Getting the cell holding the information on the day to start @@ -675,7 +675,7 @@ public class ToDo { * @param intRow Number of row. * @param intColumn Number of column. */ - public void setDayOfWeek( GregorianCalendar gregCal, + private void setDayOfWeek( GregorianCalendar gregCal, XCellRange xcellrange, int intRow, int intColumn) { int intDayOfWeek = gregCal.get( Calendar.DAY_OF_WEEK ); @@ -703,7 +703,7 @@ public class ToDo { * @param xfunctionaccess Provides access to functions of the Calc. * @param intYear Year to calculate the official holidays. */ - public void getOfficialHolidays( + private void getOfficialHolidays( ArrayList<Object> vectorHolidays, XCellRange xcellrange, XFunctionAccess xfunctionaccess, @@ -795,7 +795,7 @@ public class ToDo { * @return The gregorian date before or after a specified number of * workdays. */ - public GregorianCalendar getWorkday( + private GregorianCalendar getWorkday( GregorianCalendar gregCalStartDate, int intDays, Object[][] objectHolidays, XFunctionAccess xfunctionaccess ) { @@ -839,7 +839,7 @@ public class ToDo { * @param xcellrange Providing the cells. * @param xfunctionaccess Provides the access to functions of the Calc. */ - public void getPrivateHolidays( ArrayList<Object> vectorHolidays, + private void getPrivateHolidays( ArrayList<Object> vectorHolidays, XCellRange xcellrange, XFunctionAccess xfunctionaccess ) { try { @@ -882,7 +882,7 @@ public class ToDo { /** Showing the stack trace in a JOptionPane. * @param sMessage The message to show. */ - public void showMessage( String sMessage ) { + private void showMessage( String sMessage ) { javax.swing.JFrame jframe = new javax.swing.JFrame(); jframe.setLocation(100, 100); jframe.setSize(300, 200); @@ -898,7 +898,7 @@ public class ToDo { * @param exception The occurred exception. * @see #showMessage(String) */ - public void showExceptionMessage( Exception exception ) { + private void showExceptionMessage( Exception exception ) { java.io.StringWriter swriter = new java.io.StringWriter(); java.io.PrintWriter printwriter = new java.io.PrintWriter( swriter ); |