summaryrefslogtreecommitdiff
path: root/odk/examples/java
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-08 12:44:57 +0200
committerNoel Grandin <noel@peralex.com>2014-08-13 08:49:23 +0200
commit68cd011c907d00493bf2bfde531c1e244819596b (patch)
tree0225318c908b00faaa701a19aaf7aa567c3582a0 /odk/examples/java
parent70f56bc22fe952c75ec714e05e1bb5296491a36a (diff)
java: reduce scope, make some methods private
found by UCDetector Change-Id: Ib1425edde146193a65c242dc159b7e3fbf0e4a2e
Diffstat (limited to 'odk/examples/java')
-rw-r--r--odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObject.java18
-rw-r--r--odk/examples/java/Inspector/HideableTreeModel.java20
-rw-r--r--odk/examples/java/Inspector/Inspector.java10
-rw-r--r--odk/examples/java/Inspector/InspectorAddon.java2
-rw-r--r--odk/examples/java/Inspector/InspectorPane.java4
-rw-r--r--odk/examples/java/Inspector/Introspector.java12
-rw-r--r--odk/examples/java/Inspector/MethodParametersDialog.java2
-rw-r--r--odk/examples/java/Inspector/ProtocolHandlerAddon.java4
-rw-r--r--odk/examples/java/Inspector/SourceCodeGenerator.java10
-rw-r--r--odk/examples/java/Inspector/SwingDialogProvider.java8
-rw-r--r--odk/examples/java/Inspector/TDocSupplier.java4
-rw-r--r--odk/examples/java/Inspector/UnoNode.java4
-rw-r--r--odk/examples/java/Inspector/UnoPropertyNode.java4
-rw-r--r--odk/examples/java/MinimalComponent/MinimalComponent.java2
-rw-r--r--odk/examples/java/ToDo/ToDo.java24
15 files changed, 64 insertions, 64 deletions
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 );