summaryrefslogtreecommitdiff
path: root/odk/examples/DevelopersGuide/GUI
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-12 15:09:06 +0200
committerNoel Grandin <noel@peralex.com>2014-08-19 14:57:17 +0200
commitff0ad0493ee1729c726587f667761b04101d774c (patch)
tree8c0f97e8740fbdb2ed0cdbfc5d99d82cae8f7df6 /odk/examples/DevelopersGuide/GUI
parentbe1bb7b1ccee28be616b89cc95e97d656e78bbe3 (diff)
java: use 'Integer.valueOf' instead of 'new Integer'
Change-Id: Ia8befb8d69914ce971174fc5f2ffc0e2f506a940
Diffstat (limited to 'odk/examples/DevelopersGuide/GUI')
-rw-r--r--odk/examples/DevelopersGuide/GUI/DialogDocument.java4
-rw-r--r--odk/examples/DevelopersGuide/GUI/ImageControlSample.java6
-rw-r--r--odk/examples/DevelopersGuide/GUI/RoadmapItemStateChangeListener.java2
-rw-r--r--odk/examples/DevelopersGuide/GUI/UnoDialogSample.java64
-rw-r--r--odk/examples/DevelopersGuide/GUI/UnoDialogSample2.java6
-rw-r--r--odk/examples/DevelopersGuide/GUI/UnoMenu2.java6
6 files changed, 44 insertions, 44 deletions
diff --git a/odk/examples/DevelopersGuide/GUI/DialogDocument.java b/odk/examples/DevelopersGuide/GUI/DialogDocument.java
index 9db851852006..8ec7681cab38 100644
--- a/odk/examples/DevelopersGuide/GUI/DialogDocument.java
+++ b/odk/examples/DevelopersGuide/GUI/DialogDocument.java
@@ -65,13 +65,13 @@ public class DialogDocument extends UnoDialogSample {
XMultiComponentFactory xMCF = xContext.getServiceManager();
oDialogDocument = new DialogDocument(xContext, xMCF);
oDialogDocument.initialize( new String[] {"Height", "Moveable", "Name","PositionX","PositionY", "Step", "TabIndex","Title","Width"},
- new Object[] { new Integer(400), Boolean.TRUE, "Dialog1", new Integer(102),new Integer(41), new Integer(1), new Short((short) 0), "Document-Dialog", new Integer(300)});
+ new Object[] { Integer.valueOf(400), Boolean.TRUE, "Dialog1", Integer.valueOf(102),Integer.valueOf(41), Integer.valueOf(1), new Short((short) 0), "Document-Dialog", Integer.valueOf(300)});
oDialogDocument.createWindowPeer();
Object oFTHeaderModel = oDialogDocument.m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlFixedTextModel");
XMultiPropertySet xFTHeaderModelMPSet = UnoRuntime.queryInterface(XMultiPropertySet.class, oFTHeaderModel);
xFTHeaderModelMPSet.setPropertyValues(
new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "Width"},
- new Object[] { new Integer(8), "This code-sample demonstrates how to display an office document in a dialog window", "HeaderLabel", new Integer(6), new Integer(6), new Integer(300)});
+ new Object[] { Integer.valueOf(8), "This code-sample demonstrates how to display an office document in a dialog window", "HeaderLabel", Integer.valueOf(6), Integer.valueOf(6), Integer.valueOf(300)});
// add the model to the NameContainer of the dialog model
oDialogDocument.m_xDlgModelNameContainer.insertByName("Headerlabel", oFTHeaderModel);
oDialogDocument.showDocumentinDialogWindow(oDialogDocument.m_xWindowPeer, new Rectangle(40, 50, 420, 550), "private:factory/swriter");
diff --git a/odk/examples/DevelopersGuide/GUI/ImageControlSample.java b/odk/examples/DevelopersGuide/GUI/ImageControlSample.java
index c22e6701394b..ac2bf2791930 100644
--- a/odk/examples/DevelopersGuide/GUI/ImageControlSample.java
+++ b/odk/examples/DevelopersGuide/GUI/ImageControlSample.java
@@ -69,12 +69,12 @@ public class ImageControlSample extends UnoDialogSample{
XMultiComponentFactory xMCF = xContext.getServiceManager();
oImageControlSample = new ImageControlSample(xContext, xMCF);
oImageControlSample.initialize( new String[] {"Height", "Moveable", "Name","PositionX","PositionY", "Step", "TabIndex","Title","Width"},
- new Object[] { new Integer(100), Boolean.TRUE, "MyTestDialog", new Integer(102),new Integer(41), new Integer(0), new Short((short) 0), "OpenOffice", new Integer(230)});
+ new Object[] { Integer.valueOf(100), Boolean.TRUE, "MyTestDialog", Integer.valueOf(102),Integer.valueOf(41), Integer.valueOf(0), new Short((short) 0), "OpenOffice", Integer.valueOf(230)});
Object oFTHeaderModel = oImageControlSample.m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlFixedTextModel");
XMultiPropertySet xFTHeaderModelMPSet = UnoRuntime.queryInterface(XMultiPropertySet.class, oFTHeaderModel);
xFTHeaderModelMPSet.setPropertyValues(
new String[] {"Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Width"},
- new Object[] { new Integer(16), "This code-sample demonstrates how to create an ImageControlSample within a dialog", Boolean.TRUE, "HeaderLabel", new Integer(6), new Integer(6), new Integer(210)});
+ new Object[] { Integer.valueOf(16), "This code-sample demonstrates how to create an ImageControlSample within a dialog", Boolean.TRUE, "HeaderLabel", Integer.valueOf(6), Integer.valueOf(6), Integer.valueOf(210)});
// add the model to the NameContainer of the dialog model
oImageControlSample.m_xDlgModelNameContainer.insertByName("Headerlabel", oFTHeaderModel);
XPropertySet xICModelPropertySet = oImageControlSample.insertImageControl(68, 30, 32, 90);
@@ -116,7 +116,7 @@ public class ImageControlSample extends UnoDialogSample{
// The image is not scaled
xICModelMPSet.setPropertyValues(
new String[] {"Border", "Height", "Name", "PositionX", "PositionY", "ScaleImage", "Width"},
- new Object[] { new Short((short) 1), new Integer(_nHeight), sName, new Integer(_nPosX), new Integer(_nPosY), Boolean.FALSE, new Integer(_nWidth)});
+ new Object[] { new Short((short) 1), Integer.valueOf(_nHeight), sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), Boolean.FALSE, Integer.valueOf(_nWidth)});
// The controlmodel is not really available until inserted to the Dialog container
m_xDlgModelNameContainer.insertByName(sName, oICModel);
diff --git a/odk/examples/DevelopersGuide/GUI/RoadmapItemStateChangeListener.java b/odk/examples/DevelopersGuide/GUI/RoadmapItemStateChangeListener.java
index 4f084d629df6..61fbf5f6958b 100644
--- a/odk/examples/DevelopersGuide/GUI/RoadmapItemStateChangeListener.java
+++ b/odk/examples/DevelopersGuide/GUI/RoadmapItemStateChangeListener.java
@@ -54,7 +54,7 @@ public class RoadmapItemStateChangeListener implements XItemListener {
// in the following line "ID" and "Step" are mixed together.
// In fact in this case they denot the same
if (nNewID != nOldStep){
- xDialogModelPropertySet.setPropertyValue("Step", new Integer(nNewID));
+ xDialogModelPropertySet.setPropertyValue("Step", Integer.valueOf(nNewID));
}
} catch (com.sun.star.uno.Exception exception) {
exception.printStackTrace(System.err);
diff --git a/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java b/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java
index 750b4a5d4a59..6a0f6fab85dd 100644
--- a/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java
+++ b/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java
@@ -134,12 +134,12 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
XMultiComponentFactory xMCF = xContext.getServiceManager();
oUnoDialogSample = new UnoDialogSample(xContext, xMCF);
oUnoDialogSample.initialize( new String[] {"Height", "Moveable", "Name","PositionX","PositionY", "Step", "TabIndex","Title","Width"},
- new Object[] { new Integer(380), Boolean.TRUE, "MyTestDialog", new Integer(102),new Integer(41), new Integer(0), new Short((short) 0), "OpenOffice", new Integer(380)});
+ new Object[] { Integer.valueOf(380), Boolean.TRUE, "MyTestDialog", Integer.valueOf(102),Integer.valueOf(41), Integer.valueOf(0), new Short((short) 0), "OpenOffice", Integer.valueOf(380)});
Object oFTHeaderModel = oUnoDialogSample.m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlFixedTextModel");
XMultiPropertySet xFTHeaderModelMPSet = UnoRuntime.queryInterface(XMultiPropertySet.class, oFTHeaderModel);
xFTHeaderModelMPSet.setPropertyValues(
new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "Width"},
- new Object[] { new Integer(8), "This code-sample demonstrates how to create various controls in a dialog", "HeaderLabel", new Integer(106), new Integer(6), new Integer(300)});
+ new Object[] { Integer.valueOf(8), "This code-sample demonstrates how to create various controls in a dialog", "HeaderLabel", Integer.valueOf(106), Integer.valueOf(6), Integer.valueOf(300)});
// add the model to the NameContainer of the dialog model
oUnoDialogSample.m_xDlgModelNameContainer.insertByName("Headerlabel", oFTHeaderModel);
oUnoDialogSample.insertFixedText(oUnoDialogSample, 106, 18, 100, 0, "My ~Label");
@@ -297,7 +297,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
xFTModelMPSet.setPropertyValues(
new String[] {"Height", "Name", "PositionX", "PositionY", "Step", "Width"},
- new Object[] { new Integer(8), sName, new Integer(_nPosX), new Integer(_nPosY), new Integer(_nStep), new Integer(_nWidth)});
+ new Object[] { Integer.valueOf(8), sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), Integer.valueOf(_nStep), Integer.valueOf(_nWidth)});
// add the model to the NameContainer of the dialog model
m_xDlgModelNameContainer.insertByName(sName, oFTModel);
@@ -340,7 +340,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
// Set the properties at the model - keep in mind to pass the property names in alphabetical order!
xCFModelMPSet.setPropertyValues(
new String[] {"Height", "Name", "PositionX", "PositionY", "Width"},
- new Object[] { new Integer(12), sName, new Integer(_nPositionX), new Integer(_nPositionY), new Integer(_nWidth)});
+ new Object[] { Integer.valueOf(12), sName, Integer.valueOf(_nPositionX), Integer.valueOf(_nPositionY), Integer.valueOf(_nWidth)});
// The controlmodel is not really available until inserted to the Dialog container
m_xDlgModelNameContainer.insertByName(sName, oCFModel);
@@ -386,7 +386,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
// Set the properties at the model - keep in mind to pass the property names in alphabetical order!
xPBModelMPSet.setPropertyValues(
new String[] {"Height", "Name", "PositionX", "PositionY", "Width"},
- new Object[] { new Integer(8), sName, new Integer(_nPosX), new Integer(_nPosY), new Integer(_nWidth)});
+ new Object[] { Integer.valueOf(8), sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), Integer.valueOf(_nWidth)});
// The controlmodel is not really available until inserted to the Dialog container
m_xDlgModelNameContainer.insertByName(sName, oPBModel);
@@ -394,8 +394,8 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
// The following properties may also be set with XMultiPropertySet but we
// use the XPropertySet interface merely for reasons of demonstration
- xPBModelPSet.setPropertyValue("ProgressValueMin", new Integer(0));
- xPBModelPSet.setPropertyValue("ProgressValueMax", new Integer(_nProgressMax));
+ xPBModelPSet.setPropertyValue("ProgressValueMin", Integer.valueOf(0));
+ xPBModelPSet.setPropertyValue("ProgressValueMax", Integer.valueOf(_nProgressMax));
} catch (com.sun.star.uno.Exception ex) {
/* perform individual exception handling here.
* Possible exception types are:
@@ -425,7 +425,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
// Set the properties at the model - keep in mind to pass the property names in alphabetical order!
xFLModelMPSet.setPropertyValues(
new String[] {"Height", "Name", "Orientation", "PositionX", "PositionY", "Width"},
- new Object[] { new Integer(8), sName, new Integer(0), new Integer(_nPosX), new Integer(_nPosY), new Integer(_nWidth)});
+ new Object[] { Integer.valueOf(8), sName, Integer.valueOf(0), Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), Integer.valueOf(_nWidth)});
// The controlmodel is not really available until inserted to the Dialog container
m_xDlgModelNameContainer.insertByName(sName, oFLModel);
@@ -462,7 +462,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
// Set the properties at the model - keep in mind to pass the property names in alphabetical order!
xGBModelMPSet.setPropertyValues(
new String[] {"Height", "Name", "PositionX", "PositionY", "Width"},
- new Object[] { new Integer(_nHeight), sName, new Integer(_nPosX), new Integer(_nPosY), new Integer(_nWidth)});
+ new Object[] { Integer.valueOf(_nHeight), sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), Integer.valueOf(_nWidth)});
// The controlmodel is not really available until inserted to the Dialog container
m_xDlgModelNameContainer.insertByName(sName, oGBModel);
@@ -500,7 +500,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
// Set the properties at the model - keep in mind to pass the property names in alphabetical order!
xTFModelMPSet.setPropertyValues(
new String[] {"Height", "Name", "PositionX", "PositionY", "Text", "Width"},
- new Object[] { new Integer(12), sName, new Integer(_nPosX), new Integer(_nPosY), "MyText", new Integer(_nWidth)});
+ new Object[] { Integer.valueOf(12), sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), "MyText", Integer.valueOf(_nWidth)});
// The controlmodel is not really available until inserted to the Dialog container
m_xDlgModelNameContainer.insertByName(sName, oTFModel);
@@ -545,7 +545,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
// Set the properties at the model - keep in mind to pass the property names in alphabetical order!
xTFModelMPSet.setPropertyValues(
new String[] {"Height", "Name", "PositionX", "PositionY", "Spin", "Width"},
- new Object[] { new Integer(12), sName, new Integer(_nPosX), new Integer(_nPosY), Boolean.TRUE, new Integer(_nWidth)});
+ new Object[] { Integer.valueOf(12), sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), Boolean.TRUE, Integer.valueOf(_nWidth)});
// The controlmodel is not really available until inserted to the Dialog container
m_xDlgModelNameContainer.insertByName(sName, oTFModel);
@@ -587,7 +587,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
// Set the properties at the model - keep in mind to pass the property names in alphabetical order!
xDFModelMPSet.setPropertyValues(
new String[] {"Dropdown", "Height", "Name", "PositionX", "PositionY", "Width"},
- new Object[] {Boolean.TRUE, new Integer(12), sName, new Integer(_nPosX), new Integer(_nPosY), new Integer(_nWidth)});
+ new Object[] {Boolean.TRUE, Integer.valueOf(12), sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), Integer.valueOf(_nWidth)});
// The controlmodel is not really available until inserted to the Dialog container
m_xDlgModelNameContainer.insertByName(sName, oDFModel);
@@ -633,7 +633,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
// Set the properties at the model - keep in mind to pass the property names in alphabetical order!
xPFModelMPSet.setPropertyValues(
new String[] {"Height", "Name", "PositionX", "PositionY", "Width"},
- new Object[] { new Integer(12), sName, new Integer(_nPosX), new Integer(_nPosY), new Integer(_nWidth)});
+ new Object[] { Integer.valueOf(12), sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), Integer.valueOf(_nWidth)});
// The controlmodel is not really available until inserted to the Dialog container
m_xDlgModelNameContainer.insertByName(sName, oPFModel);
@@ -676,7 +676,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
// Set the properties at the model - keep in mind to pass the property names in alphabetical order!
xNFModelMPSet.setPropertyValues(
new String[] {"Height", "Name", "PositionX", "PositionY", "Spin", "StrictFormat", "Width"},
- new Object[] { new Integer(12), sName, new Integer(_nPosX), new Integer(_nPosY), Boolean.TRUE, Boolean.TRUE, new Integer(_nWidth)});
+ new Object[] { Integer.valueOf(12), sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), Boolean.TRUE, Boolean.TRUE, Integer.valueOf(_nWidth)});
// The controlmodel is not really available until inserted to the Dialog container
m_xDlgModelNameContainer.insertByName(sName, oNFModel);
@@ -712,7 +712,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
// create a unique name by means of an own implementation...
String sName = createUniqueName(m_xDlgModelNameContainer, "ScrollBar");
- Integer NOrientation = new Integer(com.sun.star.awt.ScrollBarOrientation.VERTICAL);
+ Integer NOrientation = Integer.valueOf(com.sun.star.awt.ScrollBarOrientation.VERTICAL);
// create a controlmodel at the multiservicefactory of the dialog model...
Object oSBModel = m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlScrollBarModel");
@@ -720,7 +720,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
// Set the properties at the model - keep in mind to pass the property names in alphabetical order!
xSBModelMPSet.setPropertyValues(
new String[] {"Height", "Name", "Orientation", "PositionX", "PositionY", "Width"},
- new Object[] { new Integer(_nHeight), sName, NOrientation, new Integer(_nPosX), new Integer(_nPosY), new Integer(8)});
+ new Object[] { Integer.valueOf(_nHeight), sName, NOrientation, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), Integer.valueOf(8)});
// The controlmodel is not really available until inserted to the Dialog container
m_xDlgModelNameContainer.insertByName(sName, oSBModel);
@@ -728,11 +728,11 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
xSBModelPSet = UnoRuntime.queryInterface(XPropertySet.class, oSBModel);
// The following properties may also be set with XMultiPropertySet but we
// use the XPropertySet interface merely for reasons of demonstration
- xSBModelPSet.setPropertyValue("ScrollValueMin", new Integer(0));
- xSBModelPSet.setPropertyValue("ScrollValueMax", new Integer(100));
- xSBModelPSet.setPropertyValue("ScrollValue", new Integer(5));
- xSBModelPSet.setPropertyValue("LineIncrement", new Integer(2));
- xSBModelPSet.setPropertyValue("BlockIncrement", new Integer(10));
+ xSBModelPSet.setPropertyValue("ScrollValueMin", Integer.valueOf(0));
+ xSBModelPSet.setPropertyValue("ScrollValueMax", Integer.valueOf(100));
+ xSBModelPSet.setPropertyValue("ScrollValue", Integer.valueOf(5));
+ xSBModelPSet.setPropertyValue("LineIncrement", Integer.valueOf(2));
+ xSBModelPSet.setPropertyValue("BlockIncrement", Integer.valueOf(10));
// Add an Adjustment that will listen to changes of the scrollbar...
XControl xSBControl = m_xDlgContainer.getControl(sName);
@@ -787,7 +787,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
XMultiPropertySet xCBMPSet = UnoRuntime.queryInterface(XMultiPropertySet.class, oCBModel);
xCBMPSet.setPropertyValues(
new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "Width" } ,
- new Object[] {new Integer(8), "~Include page number", sName, new Integer(_nPosX), new Integer(_nPosY), new Integer(_nWidth)});
+ new Object[] {Integer.valueOf(8), "~Include page number", sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), Integer.valueOf(_nWidth)});
// The following property may also be set with XMultiPropertySet but we
// use the XPropertySet interface merely for reasons of demonstration
@@ -830,7 +830,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
// Set the properties at the model - keep in mind to pass the property names in alphabetical order!
xRBMPSet.setPropertyValues(
new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "State", "TabIndex", "Width" } ,
- new Object[] {new Integer(8), "~First Option", sName, new Integer(_nPosX), new Integer(_nPosY), new Short((short) 1), new Short(_nTabIndex++),new Integer(_nWidth)});
+ new Object[] {Integer.valueOf(8), "~First Option", sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), new Short((short) 1), new Short(_nTabIndex++),Integer.valueOf(_nWidth)});
// add the model to the NameContainer of the dialog model
m_xDlgModelNameContainer.insertByName(sName, oRBModel);
@@ -842,7 +842,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
// Set the properties at the model - keep in mind to pass the property names in alphabetical order!
xRBMPSet.setPropertyValues(
new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "TabIndex", "Width" } ,
- new Object[] {new Integer(8), "~Second Option", sName, new Integer(130), new Integer(214), new Short(_nTabIndex), new Integer(150)});
+ new Object[] {Integer.valueOf(8), "~Second Option", sName, Integer.valueOf(130), Integer.valueOf(214), new Short(_nTabIndex), Integer.valueOf(150)});
// add the model to the NameContainer of the dialog model
m_xDlgModelNameContainer.insertByName(sName, oRBModel);
} catch (com.sun.star.uno.Exception ex) {
@@ -872,7 +872,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
// Set the properties at the model - keep in mind to pass the property names in alphabetical order!
xLBModelMPSet.setPropertyValues(
new String[] {"Dropdown", "Height", "Name", "PositionX", "PositionY", "Step", "StringItemList", "Width" } ,
- new Object[] {Boolean.TRUE, new Integer(12), sName, new Integer(_nPosX), new Integer(_nPosY), new Integer(_nStep), _sStringItemList, new Integer(_nWidth)});
+ new Object[] {Boolean.TRUE, Integer.valueOf(12), sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), Integer.valueOf(_nStep), _sStringItemList, Integer.valueOf(_nWidth)});
// The following property may also be set with XMultiPropertySet but we
// use the XPropertySet interface merely for reasons of demonstration
XPropertySet xLBModelPSet = UnoRuntime.queryInterface(XPropertySet.class, xLBModelMPSet);
@@ -914,7 +914,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
// Set the properties at the model - keep in mind to pass the property names in alphabetical order!
xCbBModelMPSet.setPropertyValues(
new String[] {"Dropdown", "Height", "Name", "PositionX", "PositionY", "StringItemList", "Width" } ,
- new Object[] {Boolean.TRUE, new Integer(12), sName, new Integer(_nPosX), new Integer(_nPosY), sStringItemList, new Integer(_nWidth)});
+ new Object[] {Boolean.TRUE, Integer.valueOf(12), sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), sStringItemList, Integer.valueOf(_nWidth)});
// The following property may also be set with XMultiPropertySet but we
// use the XPropertySet interface merely for reasons of demonstration
@@ -957,7 +957,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
// Set the properties at the model - keep in mind to pass the property names in alphabetical order!
xFFModelMPSet.setPropertyValues(
new String[] {"EffectiveValue", "Height", "Name", "PositionX", "PositionY", "StrictFormat", "Spin", "Width"},
- new Object[] { new Double(12348), new Integer(12), sName, new Integer(_nPosX), new Integer(_nPosY), Boolean.TRUE, Boolean.TRUE, new Integer(_nWidth)});
+ new Object[] { new Double(12348), Integer.valueOf(12), sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), Boolean.TRUE, Boolean.TRUE, Integer.valueOf(_nWidth)});
xFFModelPSet = UnoRuntime.queryInterface(XPropertySet.class, oFFModel);
// to define a numberformat you always need a locale...
@@ -981,7 +981,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
// The following property may also be set with XMultiPropertySet but we
// use the XPropertySet interface merely for reasons of demonstration
xFFModelPSet.setPropertyValue("FormatsSupplier", xNumberFormatsSupplier);
- xFFModelPSet.setPropertyValue("FormatKey", new Integer(nFormatKey));
+ xFFModelPSet.setPropertyValue("FormatKey", Integer.valueOf(nFormatKey));
// The controlmodel is not really available until inserted to the Dialog container
m_xDlgModelNameContainer.insertByName(sName, oFFModel);
@@ -1033,7 +1033,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
XMultiPropertySet xFCModelMPSet = UnoRuntime.queryInterface(XMultiPropertySet.class, oFCModel);
xFCModelMPSet.setPropertyValues(
new String[] {"Height", "Name", "PositionX", "PositionY", "Text", "Width"},
- new Object[] { new Integer(14), sName, new Integer(_nPosX), new Integer(_nPosY), sSystemWorkPath, new Integer(_nWidth)});
+ new Object[] { Integer.valueOf(14), sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), sSystemWorkPath, Integer.valueOf(_nWidth)});
// The controlmodel is not really available until inserted to the Dialog container
m_xDlgModelNameContainer.insertByName(sName, oFCModel);
@@ -1072,7 +1072,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
// Set the properties at the model - keep in mind to pass the property names in alphabetical order!
xButtonMPSet.setPropertyValues(
new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "PushButtonType", "Width" } ,
- new Object[] {new Integer(14), _sLabel, sName, new Integer(_nPosX), new Integer(_nPosY), new Short(_nPushButtonType), new Integer(_nWidth)});
+ new Object[] {Integer.valueOf(14), _sLabel, sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), new Short(_nPushButtonType), Integer.valueOf(_nWidth)});
// add the model to the NameContainer of the dialog model
m_xDlgModelNameContainer.insertByName(sName, oButtonModel);
@@ -1320,7 +1320,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
// define the properties of the roadmapmodel
XMultiPropertySet xRMMPSet = UnoRuntime.queryInterface(XMultiPropertySet.class, oRoadmapModel);
xRMMPSet.setPropertyValues( new String[] {"Complete", "Height", "Name", "PositionX", "PositionY", "Text", "Width" },
- new Object[] {Boolean.FALSE, new Integer(nDialogHeight - 26), sRoadmapName, new Integer(0), new Integer(0), "Steps", new Integer(85)});
+ new Object[] {Boolean.FALSE, Integer.valueOf(nDialogHeight - 26), sRoadmapName, Integer.valueOf(0), Integer.valueOf(0), "Steps", Integer.valueOf(85)});
m_xRMPSet = UnoRuntime.queryInterface(XPropertySet.class, oRoadmapModel);
// add the roadmapmodel to the dialog container..
@@ -1354,7 +1354,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
// sometimes steps are supposed to be set disabled depending on the program logic...
xRMItemPSet.setPropertyValue("Enabled", Boolean.valueOf(_bEnabled));
// in this context the "ID" is meant to refer to a step of the dialog
- xRMItemPSet.setPropertyValue("ID", new Integer(_ID));
+ xRMItemPSet.setPropertyValue("ID", Integer.valueOf(_ID));
m_xRMIndexCont.insertByIndex(Index, oRoadmapItem);
} catch (com.sun.star.uno.Exception exception) {
exception.printStackTrace(System.err);
diff --git a/odk/examples/DevelopersGuide/GUI/UnoDialogSample2.java b/odk/examples/DevelopersGuide/GUI/UnoDialogSample2.java
index 225262732e49..a73362a53a87 100644
--- a/odk/examples/DevelopersGuide/GUI/UnoDialogSample2.java
+++ b/odk/examples/DevelopersGuide/GUI/UnoDialogSample2.java
@@ -100,7 +100,7 @@ public class UnoDialogSample2 extends UnoDialogSample {
final int nListBoxHeight = nDialogHeight - 4*nControlMargin - nButtonHeight;
oUnoDialogSample2 = new UnoDialogSample2(xContext, xMCF, oUnoObject);
oUnoDialogSample2.initialize( new String[] {"Height", "Moveable", "Name","PositionX","PositionY", "Step", "TabIndex","Title","Width"},
- new Object[] { new Integer(nDialogHeight), Boolean.TRUE, "Dialog1", new Integer(102),new Integer(41), new Integer(1), new Short((short) 0), "Inspect a Uno-Object", new Integer(nDialogWidth)});
+ new Object[] { Integer.valueOf(nDialogHeight), Boolean.TRUE, "Dialog1", Integer.valueOf(102),Integer.valueOf(41), Integer.valueOf(1), new Short((short) 0), "Inspect a Uno-Object", Integer.valueOf(nDialogWidth)});
String sIntroLabel = "This Dialog lists information about a given Uno-Object.\nIt offers a view to inspect all suppported servicenames, exported interfaces, methods and properties.";
oUnoDialogSample2.insertMultiLineFixedText(nControlPosX, 27, nControlWidth, 4, 1, sIntroLabel);
// get the data from the UNO object...
@@ -220,7 +220,7 @@ public class UnoDialogSample2 extends UnoDialogSample {
// Set the properties at the model - keep in mind to pass the property names in alphabetical order!
xLBModelMPSet.setPropertyValues(
new String[] {"Dropdown", "Height", "Name", "PositionX", "PositionY", "ReadOnly", "Step", "StringItemList", "Width" } ,
- new Object[] {Boolean.FALSE, new Integer(_nHeight), sName, new Integer(_nPosX), new Integer(_nPosY), Boolean.TRUE, new Integer(_nStep), _sStringItemList, new Integer(_nWidth)});
+ new Object[] {Boolean.FALSE, Integer.valueOf(_nHeight), sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), Boolean.TRUE, Integer.valueOf(_nStep), _sStringItemList, Integer.valueOf(_nWidth)});
m_xDlgModelNameContainer.insertByName(sName, xLBModelMPSet);
}catch (com.sun.star.uno.Exception ex) {
throw new java.lang.RuntimeException("cannot happen...");
@@ -240,7 +240,7 @@ public class UnoDialogSample2 extends UnoDialogSample {
// Set the properties at the model - keep in mind to pass the property names in alphabetical order!
xFTModelMPSet.setPropertyValues(
new String[] {"Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "Width"},
- new Object[] { new Integer(nHeight), _sLabel, Boolean.TRUE, sName, new Integer(_nPosX), new Integer(_nPosY), new Integer(_nStep), new Integer(_nWidth)});
+ new Object[] { Integer.valueOf(nHeight), _sLabel, Boolean.TRUE, sName, Integer.valueOf(_nPosX), Integer.valueOf(_nPosY), Integer.valueOf(_nStep), Integer.valueOf(_nWidth)});
// add the model to the NameContainer of the dialog model
m_xDlgModelNameContainer.insertByName(sName, oFTModel);
}catch (com.sun.star.uno.Exception ex){
diff --git a/odk/examples/DevelopersGuide/GUI/UnoMenu2.java b/odk/examples/DevelopersGuide/GUI/UnoMenu2.java
index 24b0aabab04e..8869cf4394e3 100644
--- a/odk/examples/DevelopersGuide/GUI/UnoMenu2.java
+++ b/odk/examples/DevelopersGuide/GUI/UnoMenu2.java
@@ -42,13 +42,13 @@ public UnoMenu2(XComponentContext _xContext, XMultiComponentFactory _xMCF) {
XMultiComponentFactory xMCF = xContext.getServiceManager();
oUnoMenu2 = new UnoMenu2(xContext, xMCF);
oUnoMenu2.initialize( new String[] {"Height", "Moveable", "Name","PositionX","PositionY", "Step", "TabIndex","Title","Width"},
- new Object[] { new Integer(140), Boolean.TRUE, "Dialog1", new Integer(102),new Integer(41), new Integer(1), new Short((short) 0), "Menu-Dialog", new Integer(200)});
+ new Object[] { Integer.valueOf(140), Boolean.TRUE, "Dialog1", Integer.valueOf(102),Integer.valueOf(41), Integer.valueOf(1), new Short((short) 0), "Menu-Dialog", Integer.valueOf(200)});
Object oFTHeaderModel = oUnoMenu2.m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlFixedTextModel");
XMultiPropertySet xFTHeaderModelMPSet = UnoRuntime.queryInterface(XMultiPropertySet.class, oFTHeaderModel);
xFTHeaderModelMPSet.setPropertyValues(
new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "Width"},
- new Object[] { new Integer(8), "This code-sample demonstrates the creation of a popup-menu", "HeaderLabel", new Integer(6), new Integer(6), new Integer(200)});
+ new Object[] { Integer.valueOf(8), "This code-sample demonstrates the creation of a popup-menu", "HeaderLabel", Integer.valueOf(6), Integer.valueOf(6), Integer.valueOf(200)});
// add the model to the NameContainer of the dialog model
oUnoMenu2.m_xDlgModelNameContainer.insertByName("Headerlabel", oFTHeaderModel);
oUnoMenu2.addLabelForPopupMenu();
@@ -75,7 +75,7 @@ public UnoMenu2(XComponentContext _xContext, XMultiComponentFactory _xMCF) {
// Set the properties at the model - keep in mind to pass the property names in alphabetical order!
xFTModelMPSet.setPropertyValues(
new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "Width"},
- new Object[] { new Integer(8), "Right-click here", sName, new Integer(50), new Integer(50), new Integer(100)});
+ new Object[] { Integer.valueOf(8), "Right-click here", sName, Integer.valueOf(50), Integer.valueOf(50), Integer.valueOf(100)});
// add the model to the NameContainer of the dialog model
m_xDlgModelNameContainer.insertByName(sName, oFTModel);
XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, m_xDlgContainer.getControl(sName));