1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 package com.sun.star.wizards.report;
24 
25 /**
26  * This Interface separate the ReportBuilderImplementation from the layout.
27  * Only these less methods are allowed to access from the ReportBuilderImplementation.
28  * @author ll93751
29  */
30 public interface IReportBuilderLayouter
31 {
32 
33     /**
34      * Get the internal name of the current layout.
35      * This name identifies the layout in the internal access list.
36      * @return the internal layout name.
37      */
getName()38     public String getName();
39 
40     /**
41      * Get the localized name of the layout, which is shown in the layout page of the report wizard.
42      * This name comes out of the resource and will be translate in different languages.
43      * @return localized name of the layout.
44      */
getLocalizedName()45     public String getLocalizedName();
46 
47     /**
48      * For Landscape give nOrientation == com.sun.star.wizards.report.ReportLayouter.SOOPTLANDSCAPE
49      * All other numbers are interpreted as portrait format.
50      * @param nOrientation
51      */
setPageOrientation(int nOrientation)52     public void setPageOrientation(int nOrientation);
53 
54     /**
55      * dispose the layouter
56      */
dispose()57     public void dispose();
58 
59     /**
60      * Set the table name of the report
61      * This is the name to the database table.
62      * @param _nType something of com.sun.star.sdb.CommandType
63      * @param TableName
64      */
setTableName(int _nType, String TableName)65     public void setTableName(int _nType, String TableName);
66 
67     /**
68      * Insert the field names, these are the field names out of a given datebase table
69      * @param FieldNames
70      */
insertFieldNames(final String[] FieldNames)71     public void insertFieldNames(final String[] FieldNames);
72 
73     /**
74      * Insert the field type (Varchar, int, ...) as internal an int representation.
75      * @param FieldTypes
76      */
insertFieldTypes(int[] FieldTypes)77     public void insertFieldTypes(int[] FieldTypes);
78 
79     /**
80      * Insert the field width in count of chars as given in the database.
81      * @param FieldWidths
82      */
insertFieldWidths(int[] FieldWidths)83     public void insertFieldWidths(int[] FieldWidths);
84 
85     /**
86      * Insert the titles of the field names. This names are free formed
87      * @param _aFieldTitles
88      */
insertFieldTitles(String[] _aFieldTitles)89     public void insertFieldTitles(String[] _aFieldTitles);
90 
91     /**
92      * Insert the names of the groups, the group names are names out of the field names.
93      *
94      * If a group name is given here, it will not shown in the fields/titles, but must be in the field string list.
95      * @param _aGroupFieldNames
96      */
insertGroupNames(String[] _aGroupFieldNames)97     public void insertGroupNames(String[] _aGroupFieldNames);
98 
99     /**
100      * Insert the names of the groups which should be used as sorting, the group names are names out of the field names.
101      *
102      * If a group name is given here, it will not shown in the fields/titles, but must be in the field string list.
103      * @param _aSortFieldNames
104      */
insertSortingNames(String[][] _aSortFieldNames)105     public void insertSortingNames(String[][] _aSortFieldNames);
106 
107     /**
108      * This method redraws the whole layout with all it's content
109      */
layout()110     public void layout();
111 
112     /**
113      * Initialize the current Layouter with data's out of an other Layouter.
114      *
115      * This Method copies the internal fields, groups and titles
116      * @param aOtherLayouter
117      */
initializeData(IReportBuilderLayouter aOtherLayouter)118     public void initializeData(IReportBuilderLayouter aOtherLayouter);
119 
loadAndSetBackgroundTemplate(String LayoutTemplatePath)120     public void loadAndSetBackgroundTemplate(String LayoutTemplatePath);
121 }
122