示例#1
0
 public int getReportOpenMode() {
   int ReportMode = SOCREATEDOCUMENT;
   boolean bcreateTemplate =
       ((Short)
                   CurUnoDialog.getControlProperty(
                       "optCreateReportTemplate", PropertyNames.PROPERTY_STATE))
               .shortValue()
           == (short) 1;
   if (bcreateTemplate) {
     ReportMode = SOCREATETEMPLATE;
   }
   boolean buseTemplate =
       ((Short) CurUnoDialog.getControlProperty("optUseTemplate", PropertyNames.PROPERTY_STATE))
               .shortValue()
           == (short) 1;
   if (buseTemplate) {
     ReportMode = SOUSETEMPLATE;
   }
   boolean buseDocument =
       ((Short) CurUnoDialog.getControlProperty("optCreateDocument", PropertyNames.PROPERTY_STATE))
               .shortValue()
           == (short) 1;
   if (buseDocument) {
     ReportMode = SOCREATEDOCUMENT;
   }
   return ReportMode;
 }
示例#2
0
  /** This function is called if one of the radio buttons is pressed */
  private void toggleSubTemplateControls() {
    // String sStorePath = PropertyNames.EMPTY_STRING;
    Short iState =
        (Short)
            CurUnoDialog.getControlProperty(
                "optCreateReportTemplate", PropertyNames.PROPERTY_STATE);
    boolean bDoTemplateEnable = iState.shortValue() == 1;
    CurUnoDialog.setControlProperty(
        "optEditTemplate", PropertyNames.PROPERTY_ENABLED, bDoTemplateEnable);
    CurUnoDialog.setControlProperty(
        "optUseTemplate", PropertyNames.PROPERTY_ENABLED, bDoTemplateEnable);
    CurUnoDialog.setControlProperty(
        "lblHowProceed", PropertyNames.PROPERTY_ENABLED, bDoTemplateEnable);

    String sTitle = xTitleTextBox.getText();
    boolean bDoEnable = sTitle.equals(PropertyNames.EMPTY_STRING);
    CurUnoDialog.enableFinishButton(!bDoEnable);
  }