Package com.sun.star.wizards.document

Examples of com.sun.star.wizards.document.DatabaseControl


            DBControlList[i].setPosition(aPoint);
        else{
            if (FieldColumns[i].FieldType == DataType.TIMESTAMP)
                DBControlList[i] = new TimeStampControl(new Resource(xMSF, "FormWizard", "dbw"), oFormHandler, xFormName, FieldColumns[i].FieldName, aPoint);
            else{      
                DBControlList[i] = new DatabaseControl(oFormHandler, xFormName, FieldColumns[i].FieldName, FieldColumns[i].FieldType, aPoint);
                if (DBControlList[i].getControlType() == FormHandler.SOCHECKBOX)
                    DBControlList[i].setPropertyValue("Label", "");
            }
        }
        this.curDBControl = DBControlList[i];
View Full Code Here


        if (this.icurArrangement == FormWizard.SOCOLUMNARTOP){
            Control curLabelControl = LabelControlList[0];
            return curLabelControl.getPosition().Y;
        }
        else{
            DatabaseControl curDBControl = DBControlList[0];
            return curDBControl.getPosition().Y;
        }
    }
View Full Code Here

                {
                    DBControlList[i] = new TimeStampControl(new Resource(xMSF, "FormWizard", "dbw"), oFormHandler, xFormName, sFieldName, aPoint);
                }
                else
                {
                    DBControlList[i] = new DatabaseControl(oFormHandler, xFormName, sFieldName, nFieldType, aPoint);
                    if (DBControlList[i].getControlType() == FormHandler.SOCHECKBOX)
                    {
                        // Checkboxes have no Label near by
                        DBControlList[i].setPropertyValue("Label", "");
                    }
                }
            }
            DatabaseControl aDBControl = DBControlList[i];
            nDBHeight = aDBControl.getControlHeight();
            nDBWidth = aDBControl.getControlWidth();
            if (nFieldType != DataType.TIMESTAMP)
            {
                aDBControl.setSize(new Size(nDBWidth, nDBHeight));
            }
            if (aDBControl.getControlType() == FormHandler.SOCHECKBOX)
            {
                nYDBPos = nYDBPos + /*(int)*/ ((oFormHandler.getControlReferenceHeight() - nDBHeight) / 2);
                aPoint = new Point(nXDBPos, nYDBPos);
                aDBControl.setPosition(aPoint);
            }
            if (nFieldType == DataType.LONGVARCHAR) /* memo */
            {
                Helper.setUnoPropertyValue(LabelControlList[i], "MultiLine", Boolean.TRUE);
            }
            checkOuterPoints(nXDBPos, nDBWidth, nYDBPos, nDBHeight, true);
            aDBControl.setPropertyValue("Border", NBorderType);
        }
        catch (Exception e)
        {
            e.printStackTrace(System.out);
        }
View Full Code Here

            Control curLabelControl2 = LabelControlList[0];
            return curLabelControl2.getPosition().Y;
        }
        else
        {
            DatabaseControl curDBControl2 = DBControlList[0];
            return curDBControl2.getPosition().Y;
        }
    }
View Full Code Here

                    DatabaseControl[] DBControls = curControlForm.getDatabaseControls();
                    for (int n = 0; n < DBControls.length; n++)
                    {
                        if (_iStyleColors[SODBTEXTCOLOR] > -1)
                        {
                            DatabaseControl aDBControl = DBControls[n];
                            if (aDBControl != null)
                            {
                                if (aDBControl.xServiceInfo.supportsService("com.sun.star.drawing.ShapeCollection"))
                            {
                                    TimeStampControl oTimeStampControl = (TimeStampControl) aDBControl;
View Full Code Here

    // Note: on all Controls except for the checkbox the Label has to be set
    // a bit under the DBControl because its Height is also smaller

    private int getLabelDiffHeight(int _index)
    {
        final DatabaseControl curDBControl = DBControlList[_index];
        if (curDBControl != null && curDBControl.getControlType() == FormHandler.SOCHECKBOX)
        {
            return getCheckBoxDiffHeight(_index);
        }
        return oFormHandler.getBasicLabelDiffHeight();
    }
View Full Code Here

        int CorrWidth = getCorrWidth(StartIndex, EndIndex, nDist, WidthFactor);
        int iLocTCPosX = cXOffset;
        for (int i = StartIndex; i <= EndIndex; i++)
        {
            int nControlBaseWidth = 0;
            DatabaseControl dbControl = DBControlList[i];
            Control curLabelControl = LabelControlList[i];
            if (i != StartIndex)
            {
                curLabelControl.setPosition(new Point(iLocTCPosX, curLabelControl.getPosition().Y));
                dbControl.setPosition(new Point(iLocTCPosX, curLabelControl.getPosition().Y + m_LabelHeight));
            }
            final Size labelSize = curLabelControl.getSize();
            Size controlSize = dbControl.getSize();
            if (((labelSize.Width > controlSize.Width)) && (WidthFactor > 0))
            {
                nControlBaseWidth = labelSize.Width;
            }
            else
            {
                nControlBaseWidth = controlSize.Width;
            }
            if (FieldColumns[i].getFieldType() == DataType.TIMESTAMP)
            {
                TimeStampControl oDBTimeStampControl = (TimeStampControl) dbControl;
                nControlBaseWidth = oDBTimeStampControl.getSize().Width;
            }
            if (WidthFactor > 0 || isReducable(i, labelSize.Width, controlSize.Width))
            {
                controlSize.Width = nControlBaseWidth + WidthFactor * CorrWidth;
                dbControl.setSize(controlSize);
                controlSize = dbControl.getSize();
            }

            if (labelSize.Width > controlSize.Width)
            {
                iLocTCPosX += labelSize.Width;
View Full Code Here

                {
                    DBControlList[i] = new TimeStampControl(new Resource(xMSF, "FormWizard", "dbw"), oFormHandler, xFormName, sFieldName, aPoint);
                }
                else
                {
                    DBControlList[i] = new DatabaseControl(oFormHandler, xFormName, sFieldName, nFieldType, aPoint);
                    if (DBControlList[i].getControlType() == FormHandler.SOCHECKBOX)
                    {
                        // Checkboxes have no Label near by
                        DBControlList[i].setPropertyValue(PropertyNames.PROPERTY_LABEL, PropertyNames.EMPTY_STRING);
                    }
                }
            }
            DatabaseControl aDBControl = DBControlList[i];
            m_dbControlHeight = aDBControl.getControlHeight();
            m_dbControlWidth = aDBControl.getControlWidth();
            if (nFieldType != DataType.TIMESTAMP)
            {
                aDBControl.setSize(new Size(m_dbControlWidth, m_dbControlHeight));
            }
            if (aDBControl.getControlType() == FormHandler.SOCHECKBOX)
            {
                m_currentControlPosY = m_currentControlPosY + /*(int)*/ ((oFormHandler.getControlReferenceHeight() - m_dbControlHeight) / 2);
                aPoint = new Point(m_currentControlPosX, m_currentControlPosY);
                aDBControl.setPosition(aPoint);
            }
            if (nFieldType == DataType.LONGVARCHAR) /* memo */

            {
                Helper.setUnoPropertyValue(LabelControlList[i], PropertyNames.PROPERTY_MULTILINE, Boolean.TRUE);
            }
            checkOuterPoints(m_currentControlPosX, m_dbControlWidth, m_currentControlPosY, m_dbControlHeight, true);
            aDBControl.setPropertyValue(PropertyNames.PROPERTY_BORDER, NBorderType);
        }
        catch (Exception e)
        {
            e.printStackTrace(System.out);
        }
View Full Code Here

            Control curLabelControl2 = LabelControlList[0];
            return curLabelControl2.getPosition().Y;
        }
        else
        {
            DatabaseControl curDBControl2 = DBControlList[0];
            return curDBControl2.getPosition().Y;
        }
    }
View Full Code Here

                    DatabaseControl[] DBControls = curControlForm.getDatabaseControls();
                    for (int n = 0; n < DBControls.length; n++)
                    {
                        if (_iStyleColors[SODBTEXTCOLOR] > -1)
                        {
                            DatabaseControl aDBControl = DBControls[n];
                            if (aDBControl != null)
                            {
                                if (aDBControl.xServiceInfo.supportsService("com.sun.star.drawing.ShapeCollection"))
                            {
                                    TimeStampControl oTimeStampControl = (TimeStampControl) aDBControl;
View Full Code Here

TOP

Related Classes of com.sun.star.wizards.document.DatabaseControl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.