summaryrefslogtreecommitdiff
path: root/odk/examples/DevelopersGuide/Forms
diff options
context:
space:
mode:
authorAlexander Wilms <f.alexander.wilms@gmail.com>2014-02-25 19:24:31 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-02-26 10:02:49 -0600
commit99e3bd454bf607c5b561e2dc8e0f7a04f2bc28ed (patch)
tree929fae9a49326c5c92763fdd7c6e3f0def229e0a /odk/examples/DevelopersGuide/Forms
parent91ff31b6f7c2fd217518f54396bbca6d4bde98a3 (diff)
Remove visual noise from odk
Change-Id: I5638e2d37827c2d7322b72bf6ce176ac843639f1 Reviewed-on: https://gerrit.libreoffice.org/8285 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'odk/examples/DevelopersGuide/Forms')
-rw-r--r--odk/examples/DevelopersGuide/Forms/DataAwareness.java14
-rw-r--r--odk/examples/DevelopersGuide/Forms/DocumentBasedExample.java2
-rw-r--r--odk/examples/DevelopersGuide/Forms/HsqlDatabase.java6
-rw-r--r--odk/examples/DevelopersGuide/Forms/SalesFilter.java6
-rw-r--r--odk/examples/DevelopersGuide/Forms/SingleControlValidation.java4
-rw-r--r--odk/examples/DevelopersGuide/Forms/SpreadsheetValueBinding.java6
6 files changed, 19 insertions, 19 deletions
diff --git a/odk/examples/DevelopersGuide/Forms/DataAwareness.java b/odk/examples/DevelopersGuide/Forms/DataAwareness.java
index 70323e25a373..b11098698700 100644
--- a/odk/examples/DevelopersGuide/Forms/DataAwareness.java
+++ b/odk/examples/DevelopersGuide/Forms/DataAwareness.java
@@ -690,7 +690,7 @@ public class DataAwareness extends DocumentBasedExample implements XPropertyChan
// ensure that we have the tables needed for our example
ensureTables();
- // --------------------------------------------------------------
+
/* create some shapes */
XPropertySet xSNRField = m_formLayer.insertControlLine( "NumericField", "SNR", "", 3 );
m_formLayer.insertControlLine( "TextField", "FIRSTNAME", "", 11);
@@ -704,7 +704,7 @@ public class DataAwareness extends DocumentBasedExample implements XPropertyChan
xSNRField.setPropertyValue( "DecimalAccuracy", new Short( (short)0 ) );
xZipField.setPropertyValue( "DecimalAccuracy", new Short( (short)0 ) );
- // --------------------------------------------------------------
+
/** need the form the control models belong to
for this, we simply obtain the parent for any of the control models we have
@@ -720,7 +720,7 @@ public class DataAwareness extends DocumentBasedExample implements XPropertyChan
m_xMasterForm.setPropertyValue( "CommandType", new Integer( CommandType.TABLE ) );
m_xMasterForm.setPropertyValue( "Command", "SALESMEN" );
- // --------------------------------------------------------------
+
// insert the buttons
// create our button operator, if necessary
m_aOperator = new ButtonOperator( m_xCtx, m_document, m_xMasterForm );
@@ -732,7 +732,7 @@ public class DataAwareness extends DocumentBasedExample implements XPropertyChan
createButton( 42, 63, 8, "new", ">*", FormFeature.MoveToInsertRow );
createButton( 58, 63, 13, "reload", "reload", FormFeature.ReloadForm );
- // --------------------------------------------------------------
+
// create a sub for for the sales
// for this, first create a sub form and bind it to the SALES table
@@ -786,7 +786,7 @@ public class DataAwareness extends DocumentBasedExample implements XPropertyChan
xFormReset.addResetListener( this );
- // --------------------------------------------------------------
+
// the option for filtering the sales form
XIndexContainer xSalesFilterForm = m_document.createSiblingForm( xSalesForm, "SalesFilter" );
XPropertySet xSFFProps = UNO.queryPropertySet( xSalesFilterForm );
@@ -806,7 +806,7 @@ public class DataAwareness extends DocumentBasedExample implements XPropertyChan
xManualFilter, xApplyFilter );
- // --------------------------------------------------------------
+
// the options section
// for this, we need a form which is a sibling of our master form (don't want to interfere
// the controls which represent options only with the controls which are used for data access)
@@ -858,7 +858,7 @@ public class DataAwareness extends DocumentBasedExample implements XPropertyChan
// initally, we want to generate keys when moving to a new record
xKeyGen.setPropertyValue( "DefaultState", new Short( (short)1 ) );
- // --------------------------------------------------------------
+
// second options block
xLabel = m_formLayer.createControlAndShape( "GroupBox", 103, 33, 56, 25, xOptionsForm );
xLabel.setPropertyValue( "Name", "Misc" );
diff --git a/odk/examples/DevelopersGuide/Forms/DocumentBasedExample.java b/odk/examples/DevelopersGuide/Forms/DocumentBasedExample.java
index 456e4125c9d2..04a4dbc26199 100644
--- a/odk/examples/DevelopersGuide/Forms/DocumentBasedExample.java
+++ b/odk/examples/DevelopersGuide/Forms/DocumentBasedExample.java
@@ -87,7 +87,7 @@ public abstract class DocumentBasedExample implements com.sun.star.lang.XEventLi
// grab the focus to the first control
m_document.getCurrentView().grabControlFocus();
- // ----------------------------------------------
+
// wait for the user to confirm that we can exit
if ( waitForUserInput() )
{
diff --git a/odk/examples/DevelopersGuide/Forms/HsqlDatabase.java b/odk/examples/DevelopersGuide/Forms/HsqlDatabase.java
index d56501ad9f19..0a4e46e48e3b 100644
--- a/odk/examples/DevelopersGuide/Forms/HsqlDatabase.java
+++ b/odk/examples/DevelopersGuide/Forms/HsqlDatabase.java
@@ -46,21 +46,21 @@ public class HsqlDatabase
// the default connection
XConnection m_connection;
- // --------------------------------------------------------------------------------------------------------
+
public HsqlDatabase( XComponentContext _context ) throws Exception
{
m_context = _context;
createDBDocument();
}
- // --------------------------------------------------------------------------------------------------------
+
public HsqlDatabase( XComponentContext _context, String _existingDocumentURL ) throws Exception
{
m_context = _context;
createDBDocument( _existingDocumentURL );
}
- // --------------------------------------------------------------------------------------------------------
+
private void createDBDocument( String _docURL ) throws Exception
{
m_databaseDocumentFile = _docURL;
diff --git a/odk/examples/DevelopersGuide/Forms/SalesFilter.java b/odk/examples/DevelopersGuide/Forms/SalesFilter.java
index 932cf5c93981..59d979f19e4f 100644
--- a/odk/examples/DevelopersGuide/Forms/SalesFilter.java
+++ b/odk/examples/DevelopersGuide/Forms/SalesFilter.java
@@ -70,7 +70,7 @@ class SalesFilter implements XActionListener, XPropertyChangeListener, XResetLis
m_nPreviousFilterIndex = -1;
initFilterDates();
- // -------------------------------------------------------------
+
// remember the components
m_aDocument = aDocument;
m_xSalesForm = xSalesForm;
@@ -81,7 +81,7 @@ class SalesFilter implements XActionListener, XPropertyChangeListener, XResetLis
try
{
- // ----------------------------------------------------------
+
// init control models
m_xFilterList.setPropertyValue( "Dropdown", new Boolean( true ) );
m_xFilterList.setPropertyValue( "LineCount", new Short( (short)11 ) );
@@ -93,7 +93,7 @@ class SalesFilter implements XActionListener, XPropertyChangeListener, XResetLis
updateFilterControl();
updateApplyButton();
- // ----------------------------------------------------------
+
// add as listener to the events which require action
// want to know about changed selection
diff --git a/odk/examples/DevelopersGuide/Forms/SingleControlValidation.java b/odk/examples/DevelopersGuide/Forms/SingleControlValidation.java
index c54283470963..4cf81b5a53b7 100644
--- a/odk/examples/DevelopersGuide/Forms/SingleControlValidation.java
+++ b/odk/examples/DevelopersGuide/Forms/SingleControlValidation.java
@@ -102,7 +102,7 @@ public class SingleControlValidation implements XFormComponentValidityListener
}
m_inputField = controls[ 0 ];
- // ----------------------------------
+
controlPos += 4;
XPropertySet xLabel = m_formLayer.createControlAndShape( "FixedText", columnPos, controlPos, 70, 4, null );
xLabel.setPropertyValue( "Label", new String( "Status:" ) );
@@ -110,7 +110,7 @@ public class SingleControlValidation implements XFormComponentValidityListener
m_statusField = m_formLayer.createControlAndShape( "FixedText", columnPos, controlPos, 70, 4, null );
m_statusField.setPropertyValue( "Label", new String( "" ) );
- // ----------------------------------
+
controlPos += 6;
xLabel = m_formLayer.createControlAndShape( "FixedText", columnPos, controlPos, 70, 4, null );
xLabel.setPropertyValue( "Label", new String( "Explanation for invalidity:" ) );
diff --git a/odk/examples/DevelopersGuide/Forms/SpreadsheetValueBinding.java b/odk/examples/DevelopersGuide/Forms/SpreadsheetValueBinding.java
index 09233addc5dd..e3555b308a0c 100644
--- a/odk/examples/DevelopersGuide/Forms/SpreadsheetValueBinding.java
+++ b/odk/examples/DevelopersGuide/Forms/SpreadsheetValueBinding.java
@@ -46,7 +46,7 @@ public class SpreadsheetValueBinding extends DocumentBasedExample
final short exchangeRow = (short)1; // 2
final Integer backColor = new Integer( 0x00E0E0E0 );
- // ----------------------------------------------------------------------
+
// a numeric control
XPropertySet numericControl = m_formLayer.insertControlLine( "NumericField",
"enter a value", "", 30 );
@@ -59,7 +59,7 @@ public class SpreadsheetValueBinding extends DocumentBasedExample
// bind the control model to cell B2
implBind( numericControl, document.createCellBinding( sheet, exchangeColumn, exchangeRow ) );
- // ----------------------------------------------------------------------
+
// insert a list box
XPropertySet listBox = m_formLayer.insertControlLine( "ListBox",
"select an entry", "", 2, 40, 20 );
@@ -81,7 +81,7 @@ public class SpreadsheetValueBinding extends DocumentBasedExample
// and also put the list selection index into cell B2
implBind( listBox, document.createListIndexBinding( sheet, exchangeColumn, exchangeRow ) );
- // ----------------------------------------------------------------------
+
// fill the cells which we just bound the listbox to
XCellRange exchangeSheet = document.getSheet( listSourceSheet );
String[] listContent = new String[] { "first", "second", "third", "forth", "fivth" };