diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-12 15:09:06 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-19 14:57:17 +0200 |
commit | ff0ad0493ee1729c726587f667761b04101d774c (patch) | |
tree | 8c0f97e8740fbdb2ed0cdbfc5d99d82cae8f7df6 /odk/examples/DevelopersGuide/Text | |
parent | be1bb7b1ccee28be616b89cc95e97d656e78bbe3 (diff) |
java: use 'Integer.valueOf' instead of 'new Integer'
Change-Id: Ia8befb8d69914ce971174fc5f2ffc0e2f506a940
Diffstat (limited to 'odk/examples/DevelopersGuide/Text')
-rw-r--r-- | odk/examples/DevelopersGuide/Text/TextDocuments.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/odk/examples/DevelopersGuide/Text/TextDocuments.java b/odk/examples/DevelopersGuide/Text/TextDocuments.java index 92b5504f536b..dc767f3d7494 100644 --- a/odk/examples/DevelopersGuide/Text/TextDocuments.java +++ b/odk/examples/DevelopersGuide/Text/TextDocuments.java @@ -591,7 +591,7 @@ public class TextDocuments { // Set the name and value of the FieldMaster xMasterPropSet.setPropertyValue ( "Name", "UserEmperor" ); - xMasterPropSet.setPropertyValue ( "Value", new Integer ( 42 ) ); + xMasterPropSet.setPropertyValue ( "Value", Integer.valueOf( 42 ) ); // Attach the field master to the user field xUserField.attachTextFieldMaster ( xMasterPropSet ); @@ -682,7 +682,7 @@ public class TextDocuments { try { // Set the colour of the text to white - xCellCursorProps.setPropertyValue( "CharColor", new Integer(16777215)); + xCellCursorProps.setPropertyValue( "CharColor", Integer.valueOf(16777215)); } catch ( Exception e) { @@ -719,7 +719,7 @@ public class TextDocuments { // If BackTransparant is false, then the background color is visible xRow.setPropertyValue( "BackTransparent", Boolean.FALSE); // Specify the color of the background to be dark blue - xRow.setPropertyValue( "BackColor", new Integer(6710932)); + xRow.setPropertyValue( "BackColor", Integer.valueOf(6710932)); // Access the property set of the whole table XPropertySet xTableProps = UnoRuntime.queryInterface( @@ -727,7 +727,7 @@ public class TextDocuments { // We want visible background colors xTableProps.setPropertyValue( "BackTransparent", Boolean.FALSE); // Set the background colour to light blue - xTableProps.setPropertyValue( "BackColor", new Integer(13421823)); + xTableProps.setPropertyValue( "BackColor", Integer.valueOf(13421823)); // set the text (and text colour) of all the cells in the first row // of the table @@ -866,7 +866,7 @@ public class TextDocuments { Boolean.FALSE); // We want the background to be light blue - xTableProps.setPropertyValue( "BackColor", new Integer(13421823)); + xTableProps.setPropertyValue( "BackColor", Integer.valueOf(13421823)); // Inser the table into the document mxDocText.insertTextContent( mxDocCursor, xTable, false); @@ -882,7 +882,7 @@ public class TextDocuments { xRow.setPropertyValue( "BackTransparent", Boolean.FALSE); // And let's make it dark blue - xRow.setPropertyValue( "BackColor", new Integer(6710932)); + xRow.setPropertyValue( "BackColor", Integer.valueOf(6710932)); // Put a description of the table contents into the first cell insertIntoCell( "A1", "AutoText Groups", xTable); @@ -1380,7 +1380,7 @@ public class TextDocuments { XPropertySet.class, xStyle ); // Give the new style a light blue background - xStyleProps.setPropertyValue ( "ParaBackColor", new Integer (13421823)); + xStyleProps.setPropertyValue ( "ParaBackColor", Integer.valueOf(13421823)); // Get the StyleFamiliesSupplier interface of the document XStyleFamiliesSupplier xSupplier = UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, mxDoc); @@ -1628,7 +1628,7 @@ public class TextDocuments { XPropertySet xChildProps = UnoRuntime.queryInterface( XPropertySet.class, xChildNamed ); // Set the Child_Section's background colour to blue - xChildProps.setPropertyValue( "BackColor", new Integer(13421823)); + xChildProps.setPropertyValue( "BackColor", Integer.valueOf(13421823)); // Refresh the document, so the linked section matches the Child_Section XRefreshable xRefresh = UnoRuntime.queryInterface( |