form

16:35:53.580 INFO  jd.cli.Main - Decompiling form.jar
package com.sun.star.wizards.form;

import com.sun.star.beans.PropertyValue;
import com.sun.star.beans.XFastPropertySet;
import com.sun.star.beans.XMultiPropertySet;
import com.sun.star.beans.XPropertySet;
import com.sun.star.lang.XInitialization;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.lang.XServiceInfo;
import com.sun.star.lang.XTypeProvider;
import com.sun.star.lib.uno.helper.PropertySet;
import com.sun.star.task.XJobExecutor;
import com.sun.star.uno.Type;
import com.sun.star.wizards.common.Properties;
import com.sun.star.wizards.common.PropertyNames;
import java.io.PrintStream;

public class CallFormWizard$FormWizardImplementation
  extends PropertySet
  implements XInitialization, XServiceInfo, XTypeProvider, XJobExecutor
{
  private PropertyValue[] m_wizardContext;
  private static final String __serviceName = "com.sun.star.wizards.form.CallFormWizard";
  private XMultiServiceFactory m_serviceFactory;
  
  public CallFormWizard$FormWizardImplementation(XMultiServiceFactory paramXMultiServiceFactory)
  {
    m_serviceFactory = paramXMultiServiceFactory;
  }
  
  public void trigger(String paramString)
  {
    try
    {
      if (paramString.compareTo(PropertyNames.START) == 0)
      {
        FormWizard localFormWizard = new FormWizard(m_serviceFactory, m_wizardContext);
        localFormWizard.start();
      }
    }
    catch (Exception localException)
    {
      System.err.println(localException);
    }
    System.gc();
  }
  
  public void initialize(Object[] paramArrayOfObject)
    throws com.sun.star.uno.Exception
  {
    m_wizardContext = Properties.convertToPropertyValueArray(paramArrayOfObject);
  }
  
  public String[] getSupportedServiceNames()
  {
    String[] arrayOfString = new String[1];
    
    arrayOfString[0] = "com.sun.star.wizards.form.CallFormWizard";
    
    return arrayOfString;
  }
  
  public boolean supportsService(String paramString)
  {
    boolean bool = false;
    if (paramString.equals("com.sun.star.wizards.form.CallFormWizard")) {
      bool = true;
    }
    return bool;
  }
  
  public byte[] getImplementationId()
  {
    byte[] arrayOfByte = new byte[0];
    try
    {
      arrayOfByte = (PropertyNames.EMPTY_STRING + hashCode()).getBytes();
    }
    catch (Exception localException)
    {
      System.err.println(localException);
    }
    return arrayOfByte;
  }
  
  public String getImplementationName()
  {
    return FormWizardImplementation.class.getName();
  }
  
  public Type[] getTypes()
  {
    Type[] arrayOfType = new Type[0];
    try
    {
      arrayOfType = new Type[] { new Type(XJobExecutor.class), new Type(XTypeProvider.class), new Type(XServiceInfo.class), new Type(XPropertySet.class), new Type(XFastPropertySet.class), new Type(XMultiPropertySet.class), new Type(XInitialization.class) };
    }
    catch (Exception localException)
    {
      System.err.println(localException);
    }
    return arrayOfType;
  }
}

/* Location:
 * Qualified Name:     com.sun.star.wizards.form.CallFormWizard.FormWizardImplementation
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.star.wizards.form;

import com.sun.star.beans.PropertyValue;
import com.sun.star.beans.XFastPropertySet;
import com.sun.star.beans.XMultiPropertySet;
import com.sun.star.beans.XPropertySet;
import com.sun.star.comp.loader.FactoryHelper;
import com.sun.star.lang.XInitialization;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.lang.XServiceInfo;
import com.sun.star.lang.XSingleServiceFactory;
import com.sun.star.lang.XTypeProvider;
import com.sun.star.lib.uno.helper.PropertySet;
import com.sun.star.registry.XRegistryKey;
import com.sun.star.task.XJobExecutor;
import com.sun.star.uno.Type;
import com.sun.star.wizards.common.Properties;
import com.sun.star.wizards.common.PropertyNames;
import java.io.PrintStream;

public class CallFormWizard
{
  public static XSingleServiceFactory __getServiceFactory(String paramString, XMultiServiceFactory paramXMultiServiceFactory, XRegistryKey paramXRegistryKey)
  {
    XSingleServiceFactory localXSingleServiceFactory = null;
    if (paramString.equals(FormWizardImplementation.class.getName())) {
      localXSingleServiceFactory = FactoryHelper.getServiceFactory(FormWizardImplementation.class, "com.sun.star.wizards.form.CallFormWizard", paramXMultiServiceFactory, paramXRegistryKey);
    }
    return localXSingleServiceFactory;
  }
  
  public static class FormWizardImplementation
    extends PropertySet
    implements XInitialization, XServiceInfo, XTypeProvider, XJobExecutor
  {
    private PropertyValue[] m_wizardContext;
    private static final String __serviceName = "com.sun.star.wizards.form.CallFormWizard";
    private XMultiServiceFactory m_serviceFactory;
    
    public FormWizardImplementation(XMultiServiceFactory paramXMultiServiceFactory)
    {
      m_serviceFactory = paramXMultiServiceFactory;
    }
    
    public void trigger(String paramString)
    {
      try
      {
        if (paramString.compareTo(PropertyNames.START) == 0)
        {
          FormWizard localFormWizard = new FormWizard(m_serviceFactory, m_wizardContext);
          localFormWizard.start();
        }
      }
      catch (Exception localException)
      {
        System.err.println(localException);
      }
      System.gc();
    }
    
    public void initialize(Object[] paramArrayOfObject)
      throws com.sun.star.uno.Exception
    {
      m_wizardContext = Properties.convertToPropertyValueArray(paramArrayOfObject);
    }
    
    public String[] getSupportedServiceNames()
    {
      String[] arrayOfString = new String[1];
      
      arrayOfString[0] = "com.sun.star.wizards.form.CallFormWizard";
      
      return arrayOfString;
    }
    
    public boolean supportsService(String paramString)
    {
      boolean bool = false;
      if (paramString.equals("com.sun.star.wizards.form.CallFormWizard")) {
        bool = true;
      }
      return bool;
    }
    
    public byte[] getImplementationId()
    {
      byte[] arrayOfByte = new byte[0];
      try
      {
        arrayOfByte = (PropertyNames.EMPTY_STRING + hashCode()).getBytes();
      }
      catch (Exception localException)
      {
        System.err.println(localException);
      }
      return arrayOfByte;
    }
    
    public String getImplementationName()
    {
      return FormWizardImplementation.class.getName();
    }
    
    public Type[] getTypes()
    {
      Type[] arrayOfType = new Type[0];
      try
      {
        arrayOfType = new Type[] { new Type(XJobExecutor.class), new Type(XTypeProvider.class), new Type(XServiceInfo.class), new Type(XPropertySet.class), new Type(XFastPropertySet.class), new Type(XMultiPropertySet.class), new Type(XInitialization.class) };
      }
      catch (Exception localException)
      {
        System.err.println(localException);
      }
      return arrayOfType;
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.star.wizards.form.CallFormWizard
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.star.wizards.form;

import com.sun.star.awt.XCheckBox;
import com.sun.star.awt.XRadioButton;
import com.sun.star.beans.PropertyValue;
import com.sun.star.wizards.common.Helper;
import com.sun.star.wizards.common.Properties;
import com.sun.star.wizards.common.PropertyNames;
import com.sun.star.wizards.common.Resource;
import com.sun.star.wizards.ui.UnoDialog;
import com.sun.star.wizards.ui.WizardDialog;

public class DataEntrySetter
{
  private WizardDialog CurUnoDialog;
  private short curtabindex;
  private XRadioButton optNewDataOnly;
  private XRadioButton optDisplayAllData;
  private XCheckBox chknomodification;
  private XCheckBox chknodeletion;
  private XCheckBox chknoaddition;
  
  public DataEntrySetter(WizardDialog paramWizardDialog)
  {
    CurUnoDialog = paramWizardDialog;
    curtabindex = 600;
    Integer localInteger = new Integer(6);
    String str1 = CurUnoDialog.m_oResource.getResText(2244);
    String str2 = CurUnoDialog.m_oResource.getResText(2246);
    String str3 = CurUnoDialog.m_oResource.getResText(2247);
    String str4 = CurUnoDialog.m_oResource.getResText(2248);
    String str5 = CurUnoDialog.m_oResource.getResText(2249);
    String str6 = CurUnoDialog.m_oResource.getResText(2245);
    
    optNewDataOnly = CurUnoDialog.insertRadioButton("optNewDataOnly", "toggleCheckBoxes", this, new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { com.sun.star.wizards.ui.UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGFORM_OPTNEWDATAONLY", str1, Integer.valueOf(98), Integer.valueOf(25), localInteger, new Short(curtabindex++), Integer.valueOf(195) });
    
    optDisplayAllData = CurUnoDialog.insertRadioButton("optDisplayAllData", "toggleCheckBoxes", this, new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { com.sun.star.wizards.ui.UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGFORM_OPTDISPLAYALLDATA", str2, Integer.valueOf(98), Integer.valueOf(50), new Short(1), localInteger, new Short(curtabindex++), Integer.valueOf(197) });
    
    chknomodification = CurUnoDialog.insertCheckBox("chknomodification", null, new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { com.sun.star.wizards.ui.UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGFORM_CHKNOMODIFICATION", str3, Integer.valueOf(108), Integer.valueOf(62), new Short(0), localInteger, new Short(curtabindex++), Integer.valueOf(189) });
    
    chknodeletion = CurUnoDialog.insertCheckBox("chknodeletion", null, new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { com.sun.star.wizards.ui.UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGFORM_CHKNODELETION", str4, Integer.valueOf(108), Integer.valueOf(74), new Short(0), localInteger, new Short(curtabindex++), Integer.valueOf(189) });
    
    chknoaddition = CurUnoDialog.insertCheckBox("chknoaddition", null, new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { com.sun.star.wizards.ui.UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGFORM_CHKNOADDITION", str5, Integer.valueOf(108), Integer.valueOf(86), new Short(0), localInteger, new Short(curtabindex++), Integer.valueOf(191) });
    
    CurUnoDialog.insertLabel("lbldontdisplayExistingData", new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { Integer.valueOf(8), str6, Integer.valueOf(108), Integer.valueOf(33), localInteger, new Short(curtabindex++), Integer.valueOf(134) });
  }
  
  public PropertyValue[] getFormProperties()
  {
    PropertyValue[] arrayOfPropertyValue;
    if (optDisplayAllData.getState())
    {
      arrayOfPropertyValue = new PropertyValue[3];
      boolean bool1 = ((Short)Helper.getUnoPropertyValue(UnoDialog.getModel(chknomodification), PropertyNames.PROPERTY_STATE)).shortValue() != 1;
      boolean bool2 = ((Short)Helper.getUnoPropertyValue(UnoDialog.getModel(chknodeletion), PropertyNames.PROPERTY_STATE)).shortValue() != 1;
      boolean bool3 = ((Short)Helper.getUnoPropertyValue(UnoDialog.getModel(chknoaddition), PropertyNames.PROPERTY_STATE)).shortValue() != 1;
      arrayOfPropertyValue[0] = Properties.createProperty("AllowUpdates", Boolean.valueOf(bool1));
      arrayOfPropertyValue[1] = Properties.createProperty("AllowDeletes", Boolean.valueOf(bool2));
      arrayOfPropertyValue[2] = Properties.createProperty("AllowInserts", Boolean.valueOf(bool3));
    }
    else
    {
      arrayOfPropertyValue = new PropertyValue[1];
      arrayOfPropertyValue[0] = Properties.createProperty("IgnoreResult", Boolean.TRUE);
    }
    return arrayOfPropertyValue;
  }
  
  public void toggleCheckBoxes()
  {
    boolean bool = optDisplayAllData.getState();
    Helper.setUnoPropertyValue(UnoDialog.getModel(chknomodification), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bool));
    Helper.setUnoPropertyValue(UnoDialog.getModel(chknodeletion), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bool));
    Helper.setUnoPropertyValue(UnoDialog.getModel(chknoaddition), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bool));
  }
}

/* Location:
 * Qualified Name:     com.sun.star.wizards.form.DataEntrySetter
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.star.wizards.form;

import com.sun.star.awt.ItemEvent;
import com.sun.star.awt.XItemListener;
import com.sun.star.lang.EventObject;
import com.sun.star.wizards.ui.WizardDialog;

class FieldLinker$ItemListenerImpl
  implements XItemListener
{
  FieldLinker$ItemListenerImpl(FieldLinker paramFieldLinker) {}
  
  public void itemStateChanged(ItemEvent paramItemEvent)
  {
    int i = FieldLinker.access$100(this$0).getControlKey(Source, access$000this$0).ControlList);
    this$0.enableNextControlRow(i);
  }
  
  public void disposing(EventObject paramEventObject) {}
}

/* Location:
 * Qualified Name:     com.sun.star.wizards.form.FieldLinker.ItemListenerImpl
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.star.wizards.form;

import com.sun.star.awt.ItemEvent;
import com.sun.star.awt.XFixedText;
import com.sun.star.awt.XItemListener;
import com.sun.star.awt.XListBox;
import com.sun.star.lang.EventObject;
import com.sun.star.uno.Exception;
import com.sun.star.wizards.common.HelpIds;
import com.sun.star.wizards.common.Helper;
import com.sun.star.wizards.common.JavaTools;
import com.sun.star.wizards.common.PropertyNames;
import com.sun.star.wizards.common.Resource;
import com.sun.star.wizards.db.RelationController;
import com.sun.star.wizards.ui.DBLimitedFieldSelection;
import com.sun.star.wizards.ui.UIConsts;
import com.sun.star.wizards.ui.UnoDialog;
import com.sun.star.wizards.ui.WizardDialog;

public class FieldLinker
  extends DBLimitedFieldSelection
{
  private XFixedText[] lblSlaveFields;
  private XFixedText[] lblMasterFields;
  private XListBox[] lstSlaveFields;
  private XListBox[] lstMasterFields;
  private int[] SOLINKLST = null;
  private String[] sSlaveListHeader;
  private String[] sMasterListHeader;
  
  public FieldLinker(WizardDialog paramWizardDialog, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5)
  {
    super(paramWizardDialog, paramInt1, paramInt2, paramInt3, paramInt4, paramInt5);
  }
  
  protected void insertControlGroup(int paramInt)
  {
    try
    {
      if (paramInt == 0)
      {
        lblSlaveFields = new XFixedText[4];
        lblMasterFields = new XFixedText[4];
        lstSlaveFields = new XListBox[4];
        lstMasterFields = new XListBox[4];
        int i = 0;
        int j = 1;
        k = 2;
        int m = 3;
        Integer localInteger = new Integer(iCompPosX + 6);
        sSlaveListHeader = CurUnoDialog.m_oResource.getResArray(2220, 4);
        sMasterListHeader = CurUnoDialog.m_oResource.getResArray(2224, 4);
        SOLINKLST = new int[] { i, j, k, m };
      }
      String str1 = HelpIds.getHelpIdString(FirstHelpIndex + paramInt * 2);
      String str2 = HelpIds.getHelpIdString(FirstHelpIndex + paramInt * 2 + 1);
      int k = paramInt < 2 ? 1 : 0;
      lblSlaveFields[paramInt] = CurUnoDialog.insertLabel("lblSlaveFieldLink" + Integer.toString(paramInt + 1), new String[] { PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { Boolean.valueOf(k), Integer.valueOf(8), sSlaveListHeader[paramInt], Integer.valueOf(97), new Integer(iCurPosY), IStep, new Short(curtabindex++), Integer.valueOf(97) });
      
      lstSlaveFields[paramInt] = CurUnoDialog.insertListBox("lstSlaveFieldLink" + (paramInt + 1), SOLINKLST[paramInt], null, new ItemListenerImpl(), new String[] { "Dropdown", PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "LineCount", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { Boolean.TRUE, Boolean.valueOf(k), UIConsts.INTEGER_12, str1, Short.valueOf(UnoDialog.getListBoxLineCount()), Integer.valueOf(97), new Integer(iCurPosY + 10), IStep, new Short(curtabindex++), Integer.valueOf(97) });
      
      lblMasterFields[paramInt] = CurUnoDialog.insertLabel("lblMasterFieldLink" + Integer.toString(paramInt + 1), new String[] { PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { Boolean.valueOf(k), Integer.valueOf(8), sMasterListHeader[paramInt], Integer.valueOf(206), new Integer(iCurPosY), IStep, new Short(curtabindex++), Integer.valueOf(97) });
      
      lstMasterFields[paramInt] = CurUnoDialog.insertListBox("lstMasterFieldLink" + Integer.toString(paramInt + 1), SOLINKLST[paramInt], null, new ItemListenerImpl(), new String[] { "Dropdown", PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "LineCount", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { Boolean.TRUE, Boolean.valueOf(k), UIConsts.INTEGER_12, str2, Short.valueOf(UnoDialog.getListBoxLineCount()), Integer.valueOf(206), new Integer(iCurPosY + 10), IStep, new Short(curtabindex++), Integer.valueOf(97) });
      
      iCurPosY += 38;
    }
    catch (Exception localException)
    {
      localException.printStackTrace(System.out);
    }
  }
  
  protected void enableNextControlRow(int paramInt)
  {
    int i = lstSlaveFields[paramInt].getSelectedItemPos() > 0 ? 1 : 0;
    int j = lstMasterFields[paramInt].getSelectedItemPos() > 0 ? 1 : 0;
    boolean bool = (i != 0) && (j != 0);
    if (!bool) {
      moveupSelectedItems(paramInt, bool);
    } else {
      toggleControlRow(paramInt + 1, true);
    }
  }
  
  protected int getMaxSelIndex()
  {
    int i = -1;
    for (int j = 0; j < 4; j++) {
      if ((lstSlaveFields[j].getSelectedItemPos() > 0) && (lstMasterFields[j].getSelectedItemPos() > 0)) {
        i++;
      }
    }
    return i;
  }
  
  protected void toggleControlRow(int paramInt, boolean paramBoolean)
  {
    if (paramInt < 4)
    {
      Helper.setUnoPropertyValue(UnoDialog.getModel(lblSlaveFields[paramInt]), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(paramBoolean));
      Helper.setUnoPropertyValue(UnoDialog.getModel(lstSlaveFields[paramInt]), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(paramBoolean));
      Helper.setUnoPropertyValue(UnoDialog.getModel(lblMasterFields[paramInt]), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(paramBoolean));
      Helper.setUnoPropertyValue(UnoDialog.getModel(lstMasterFields[paramInt]), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(paramBoolean));
      if (!paramBoolean)
      {
        Helper.setUnoPropertyValue(UnoDialog.getModel(lstSlaveFields[paramInt]), PropertyNames.SELECTED_ITEMS, new short[] { 0 });
        Helper.setUnoPropertyValue(UnoDialog.getModel(lstMasterFields[paramInt]), PropertyNames.SELECTED_ITEMS, new short[] { 0 });
      }
    }
  }
  
  protected void updateFromNextControlRow(int paramInt)
  {
    int i = lstMasterFields[(paramInt + 1)].getSelectedItemPos();
    int j = lstSlaveFields[(paramInt + 1)].getSelectedItemPos();
    if ((i != 0) && (j != 0))
    {
      Helper.setUnoPropertyValue(UnoDialog.getModel(lstMasterFields[paramInt]), PropertyNames.SELECTED_ITEMS, new short[] { i });
      Helper.setUnoPropertyValue(UnoDialog.getModel(lstSlaveFields[paramInt]), PropertyNames.SELECTED_ITEMS, new short[] { j });
      
      Helper.setUnoPropertyValue(UnoDialog.getModel(lstMasterFields[(paramInt + 1)]), PropertyNames.SELECTED_ITEMS, new short[] { 0 });
      Helper.setUnoPropertyValue(UnoDialog.getModel(lstSlaveFields[(paramInt + 1)]), PropertyNames.SELECTED_ITEMS, new short[] { 0 });
      toggleControlRow(paramInt, true);
    }
  }
  
  public void initialize(String[] paramArrayOfString1, String[] paramArrayOfString2, String[][] paramArrayOfString)
  {
    int i = 1;
    String[] arrayOfString1 = JavaTools.ArrayOutOfMultiDimArray(paramArrayOfString, i);
    int j = 0;
    String[] arrayOfString2 = JavaTools.ArrayOutOfMultiDimArray(paramArrayOfString, j);
    String[] arrayOfString3 = addNoneFieldItemToList(paramArrayOfString1);
    String[] arrayOfString4 = addNoneFieldItemToList(paramArrayOfString2);
    for (int k = 0;; k++)
    {
      getClass();
      if (k >= 4) {
        break;
      }
      super.initializeListBox(lstMasterFields[k], arrayOfString3, arrayOfString1, k);
      super.initializeListBox(lstSlaveFields[k], arrayOfString4, arrayOfString2, k);
      if (paramArrayOfString != null) {
        toggleControlRow(k, k <= paramArrayOfString.length);
      } else {
        toggleControlRow(k, k == 0);
      }
    }
  }
  
  public String[][] getLinkFieldNames(RelationController paramRelationController, String paramString)
  {
    return paramRelationController.getImportedKeyColumns(paramString);
  }
  
  public String[][] getLinkFieldNames()
  {
    int i = getMaxSelIndex();
    String[][] arrayOfString = new String[2][i + 1];
    for (int j = 0; j <= i; j++)
    {
      arrayOfString[0][j] = lstSlaveFields[j].getSelectedItem();
      arrayOfString[1][j] = lstMasterFields[j].getSelectedItem();
    }
    j = JavaTools.getDuplicateFieldIndex(arrayOfString);
    if (j != -1)
    {
      String str1 = CurUnoDialog.m_oResource.getResText(2219);
      String str2 = JavaTools.replaceSubString(str1, arrayOfString[0][j], "<FIELDNAME1>");
      str2 = JavaTools.replaceSubString(str2, arrayOfString[1][j], "<FIELDNAME2>");
      CurUnoDialog.setCurrentStep(4);
      CurUnoDialog.enableNavigationButtons(true, true, true);
      CurUnoDialog.showMessageBox("WarningBox", 4194304, str2);
      CurUnoDialog.setFocus("lstSlaveFieldLink" + (j + 1));
      return (String[][])null;
    }
    return arrayOfString;
  }
  
  public void enable(boolean paramBoolean)
  {
    CurUnoDialog.setStepEnabled(IStep.intValue(), paramBoolean);
  }
  
  class ItemListenerImpl
    implements XItemListener
  {
    ItemListenerImpl() {}
    
    public void itemStateChanged(ItemEvent paramItemEvent)
    {
      int i = CurUnoDialog.getControlKey(Source, CurUnoDialog.ControlList);
      enableNextControlRow(i);
    }
    
    public void disposing(EventObject paramEventObject) {}
  }
}

/* Location:
 * Qualified Name:     com.sun.star.wizards.form.FieldLinker
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.star.wizards.form;

import com.sun.star.awt.XRadioButton;
import com.sun.star.awt.XTextComponent;
import com.sun.star.wizards.common.Desktop;
import com.sun.star.wizards.common.PropertyNames;
import com.sun.star.wizards.common.Resource;
import com.sun.star.wizards.db.CommandMetaData;
import com.sun.star.wizards.ui.UIConsts;
import com.sun.star.wizards.ui.WizardDialog;

public class Finalizer
{
  WizardDialog CurUnoDialog;
  short curtabindex;
  XRadioButton optModifyForm;
  XRadioButton optWorkWithForm;
  XTextComponent txtFormName;
  FormDocument oFormDocument;
  
  public Finalizer(WizardDialog paramWizardDialog)
  {
    CurUnoDialog = paramWizardDialog;
    curtabindex = 800;
    
    String str1 = CurUnoDialog.m_oResource.getResText(2250);
    String str2 = CurUnoDialog.m_oResource.getResText(2251);
    String str3 = CurUnoDialog.m_oResource.getResText(2252);
    String str4 = CurUnoDialog.m_oResource.getResText(2253);
    CurUnoDialog.insertLabel("lblFormName", new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { UIConsts.INTEGERS[8], str1, Integer.valueOf(97), Integer.valueOf(25), UIConsts.INTEGERS[8], new Short(curtabindex++), Integer.valueOf(111) });
    
    txtFormName = CurUnoDialog.insertTextField("txtFormName", "toggleFinishButton", this, new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Text", PropertyNames.PROPERTY_WIDTH }, new Object[] { UIConsts.INTEGER_12, "HID:WIZARDS_HID_DLGFORM_TXTPATH", Integer.valueOf(97), Integer.valueOf(35), UIConsts.INTEGERS[8], new Short(82), PropertyNames.EMPTY_STRING, Integer.valueOf(185) });
    
    CurUnoDialog.insertLabel("lblProceed", new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { UIConsts.INTEGERS[8], str2, Integer.valueOf(97), Integer.valueOf(62), UIConsts.INTEGERS[8], new Short(curtabindex++), Integer.valueOf(185) });
    
    CurUnoDialog.insertRadioButton("optWorkWithForm", null, new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGFORM_OPTWORKWITHFORM", str3, Integer.valueOf(101), Integer.valueOf(77), new Short(1), UIConsts.INTEGERS[8], new Short(curtabindex++), Integer.valueOf(107) });
    
    optModifyForm = CurUnoDialog.insertRadioButton("optModifyForm", null, new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGFORM_OPTMODIFYFORM", str4, Integer.valueOf(101), Integer.valueOf(89), UIConsts.INTEGERS[8], new Short(curtabindex++), Integer.valueOf(107) });
  }
  
  public void initialize(String paramString, FormDocument paramFormDocument)
  {
    if (oFormDocument == null) {
      oFormDocument = paramFormDocument;
    }
    if (txtFormName.getText().length() == 0) {
      txtFormName.setText(Desktop.getUniqueName(oMainFormDBMetaData.getFormDocuments(), paramString));
    }
  }
  
  public void toggleFinishButton()
  {
    CurUnoDialog.enableFinishButton(txtFormName.getText().length() > 0);
  }
  
  public String getName()
  {
    return txtFormName.getText();
  }
  
  public boolean getOpenForEditing()
  {
    return optModifyForm.getState();
  }
  
  public boolean finish()
  {
    return oFormDocument.oMainFormDBMetaData.storeDatabaseDocumentToTempPath(oFormDocument.xComponent, getName());
  }
}

/* Location:
 * Qualified Name:     com.sun.star.wizards.form.Finalizer
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.star.wizards.form;

import com.sun.star.awt.XCheckBox;
import com.sun.star.awt.XFixedText;
import com.sun.star.awt.XListBox;
import com.sun.star.awt.XRadioButton;
import com.sun.star.wizards.common.Helper;
import com.sun.star.wizards.common.PropertyNames;
import com.sun.star.wizards.common.Resource;
import com.sun.star.wizards.db.RelationController;
import com.sun.star.wizards.ui.CommandFieldSelection;
import com.sun.star.wizards.ui.UnoDialog;
import com.sun.star.wizards.ui.WizardDialog;

public class FormConfiguration
{
  WizardDialog CurUnoDialog;
  short curtabindex;
  XRadioButton optOnExistingRelation;
  XCheckBox chkcreateSubForm;
  XRadioButton optSelectManually;
  XFixedText lblSubFormDescription;
  XFixedText lblRelations;
  XListBox lstRelations;
  String[] sreferencedTables;
  CommandFieldSelection CurSubFormFieldSelection;
  String SSUBFORMMODE = "toggleSubFormMode";
  String STOGGLESTEPS = "toggleSteps";
  String SONEXISTINGRELATIONSELECTION = "onexistingRelationSelection";
  boolean bsupportsRelations;
  RelationController oRelationController = null;
  
  public FormConfiguration(WizardDialog paramWizardDialog)
  {
    CurUnoDialog = paramWizardDialog;
    curtabindex = 200;
    Integer localInteger = new Integer(2);
    String str1 = CurUnoDialog.m_oResource.getResText(2205);
    String str2 = CurUnoDialog.m_oResource.getResText(2207);
    String str3 = CurUnoDialog.m_oResource.getResText(2204);
    String str4 = CurUnoDialog.m_oResource.getResText(2208);
    String str5 = CurUnoDialog.m_oResource.getResText(2203);
    
    chkcreateSubForm = CurUnoDialog.insertCheckBox("chkcreateSubForm", SSUBFORMMODE, this, new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { com.sun.star.wizards.ui.UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGFORM_CHKCREATESUBFORM", str3, Integer.valueOf(97), Integer.valueOf(26), localInteger, new Short(curtabindex++), Integer.valueOf(160) });
    
    optOnExistingRelation = CurUnoDialog.insertRadioButton("optOnExistingRelation", STOGGLESTEPS, this, new String[] { PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { Boolean.FALSE, com.sun.star.wizards.ui.UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGFORM_OPTONEXISTINGRELATION", str1, Integer.valueOf(107), Integer.valueOf(43), localInteger, new Short(curtabindex++), Integer.valueOf(160) });
    
    optSelectManually = CurUnoDialog.insertRadioButton("optSelectManually", STOGGLESTEPS, this, new String[] { PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { Boolean.FALSE, com.sun.star.wizards.ui.UIConsts.INTEGERS[8], "HID:WIZARDS_HID_DLGFORM_OPTSELECTMANUALLY", str2, Integer.valueOf(107), Integer.valueOf(99), new Short(1), localInteger, new Short(curtabindex++), Integer.valueOf(160) });
    
    lblRelations = CurUnoDialog.insertLabel("lblSelectRelation", new String[] { PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { Boolean.FALSE, Integer.valueOf(19), str4, Boolean.TRUE, Integer.valueOf(119), Integer.valueOf(56), localInteger, new Short(curtabindex++), Integer.valueOf(80) });
    
    lstRelations = CurUnoDialog.insertListBox("lstrelations", SONEXISTINGRELATIONSELECTION, SONEXISTINGRELATIONSELECTION, this, new String[] { PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { Boolean.FALSE, Integer.valueOf(37), "HID:WIZARDS_HID_DLGFORM_lstRELATIONS", Integer.valueOf(201), Integer.valueOf(55), localInteger, new Short(curtabindex++), Integer.valueOf(103) });
    
    lblSubFormDescription = CurUnoDialog.insertLabel("lblSubFormDescription", new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { Integer.valueOf(59), str5, Boolean.TRUE, Integer.valueOf(110), Integer.valueOf(120), localInteger, new Short(curtabindex++), Integer.valueOf(190) });
    
    CurUnoDialog.insertInfoImage(97, 120, localInteger.intValue());
  }
  
  public RelationController getRelationController()
  {
    return oRelationController;
  }
  
  public boolean areexistingRelationsdefined()
  {
    return (chkcreateSubForm.getState() == 1) && (optOnExistingRelation.getState());
  }
  
  public void toggleSubFormMode()
  {
    boolean bool = chkcreateSubForm.getState() == 1;
    Helper.setUnoPropertyValue(UnoDialog.getModel(optOnExistingRelation), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf((bool) && (bsupportsRelations)));
    Helper.setUnoPropertyValue(UnoDialog.getModel(optSelectManually), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bool));
    toggleSteps();
  }
  
  public void initialize(CommandFieldSelection paramCommandFieldSelection, RelationController paramRelationController)
  {
    oRelationController = paramRelationController;
    sreferencedTables = oRelationController.getExportedKeys();
    bsupportsRelations = (sreferencedTables.length > 0);
    Helper.setUnoPropertyValue(UnoDialog.getModel(lstRelations), PropertyNames.STRING_ITEM_LIST, sreferencedTables);
    CurSubFormFieldSelection = paramCommandFieldSelection;
    toggleRelationsListbox();
    Helper.setUnoPropertyValue(UnoDialog.getModel(optOnExistingRelation), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf((bsupportsRelations) && (chkcreateSubForm.getState() == 1)));
  }
  
  public void toggleSteps()
  {
    if (chkcreateSubForm.getState() == 1)
    {
      if (optOnExistingRelation.getState())
      {
        onexistingRelationSelection();
      }
      else if (optSelectManually.getState())
      {
        CurUnoDialog.enablefromStep(4, CurSubFormFieldSelection.getSelectedFieldNames().length > 0);
        CurUnoDialog.setStepEnabled(3, true);
      }
    }
    else
    {
      CurUnoDialog.setStepEnabled(3, false);
      CurUnoDialog.setStepEnabled(4, false);
      CurUnoDialog.enablefromStep(5, true);
    }
    toggleRelationsListbox();
  }
  
  public String getreferencedTableName()
  {
    if (areexistingRelationsdefined())
    {
      short[] arrayOfShort = (short[])Helper.getUnoArrayPropertyValue(UnoDialog.getModel(lstRelations), PropertyNames.SELECTED_ITEMS);
      if (arrayOfShort != null) {
        if (arrayOfShort.length > 0) {
          return sreferencedTables[arrayOfShort[0]];
        }
      }
    }
    return PropertyNames.EMPTY_STRING;
  }
  
  public void onexistingRelationSelection()
  {
    String str = getreferencedTableName();
    if (str.length() > 0)
    {
      if (CurSubFormFieldSelection.getSelectedCommandName().equals(str))
      {
        CurUnoDialog.enablefromStep(3, true);
        CurUnoDialog.setStepEnabled(4, false);
        return;
      }
      CurUnoDialog.setStepEnabled(3, true);
      CurUnoDialog.enablefromStep(4, false);
      return;
    }
    CurUnoDialog.enablefromStep(3, false);
  }
  
  private void toggleRelationsListbox()
  {
    boolean bool = (bsupportsRelations) && (optOnExistingRelation.getState()) && (chkcreateSubForm.getState() == 1);
    Helper.setUnoPropertyValue(UnoDialog.getModel(lblRelations), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bool));
    Helper.setUnoPropertyValue(UnoDialog.getModel(lstRelations), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bool));
  }
  
  public boolean hasSubForm()
  {
    return chkcreateSubForm.getState() == 1;
  }
}

/* Location:
 * Qualified Name:     com.sun.star.wizards.form.FormConfiguration
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.star.wizards.form;

import com.sun.star.awt.Point;
import com.sun.star.awt.Size;
import com.sun.star.beans.XPropertySet;
import com.sun.star.container.XNameContainer;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.task.XStatusIndicator;
import com.sun.star.uno.AnyConverter;
import com.sun.star.uno.Exception;
import com.sun.star.wizards.common.Helper;
import com.sun.star.wizards.common.PropertyNames;
import com.sun.star.wizards.common.Resource;
import com.sun.star.wizards.db.CommandMetaData;
import com.sun.star.wizards.db.FieldColumn;
import com.sun.star.wizards.document.Control;
import com.sun.star.wizards.document.DatabaseControl;
import com.sun.star.wizards.document.FormHandler;
import com.sun.star.wizards.document.Shape;
import com.sun.star.wizards.document.TimeStampControl;

public class FormControlArranger
{
  public static final String LABELCONTROL = "LabelControl";
  protected DatabaseControl[] DBControlList = null;
  private XNameContainer xFormName;
  private XMultiServiceFactory xMSF;
  private Control[] LabelControlList = null;
  private XStatusIndicator xProgressBar;
  private FieldColumn[] FieldColumns;
  private int icurArrangement;
  private boolean bIsFirstRun;
  private boolean bIsVeryFirstRun;
  private boolean bControlsareCreated;
  private int cXOffset;
  private int cYOffset;
  private static final int cVertDistance = 200;
  private static final int cHoriDistance = 300;
  private static final int cLabelGap = 100;
  private static final double CMAXREDUCTION = 0.7D;
  private FormHandler oFormHandler;
  private int iReduceWidth;
  private int m_currentLabelPosX;
  private int m_currentLabelPosY;
  private int m_currentControlPosX;
  private int m_currentControlPosY;
  private int m_LabelHeight;
  private int m_LabelWidth;
  private int m_dbControlHeight;
  private int m_dbControlWidth;
  private int m_MaxLabelWidth;
  private int nFormWidth;
  private int nFormHeight;
  private int m_currentMaxRowHeight;
  private int nSecMaxRowY;
  private int m_maxPostionX;
  private int a;
  private int StartA;
  private int m_controlMaxPosY = 0;
  private Short NBorderType = new Short((short)1);
  
  public FormControlArranger(FormHandler paramFormHandler, XNameContainer paramXNameContainer, CommandMetaData paramCommandMetaData, XStatusIndicator paramXStatusIndicator, Point paramPoint, Size paramSize)
  {
    FieldColumns = FieldColumns;
    xMSF = xMSF;
    xFormName = paramXNameContainer;
    xProgressBar = paramXStatusIndicator;
    LabelControlList = new Control[FieldColumns.length];
    DBControlList = new DatabaseControl[FieldColumns.length];
    oFormHandler = paramFormHandler;
    cXOffset = X;
    cYOffset = Y;
    setFormSize(pa
1 2 3 4

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd