public Form getAboutUs() { final Form f = new Form("Event counting"); if (frmAboutUs == null) { f.setLayout(new BoxLayout(BoxLayout.Y_AXIS)); final Button pushButton = new Button("Tap me!"); final Label countLabel = new Label(" "); pushButton.addActionListener( new ActionListener() { private int c = 0; public void actionPerformed(ActionEvent ae) { c++; countLabel.setText(Integer.toString(c)); f.layoutContainer(); pushButton.setText("Tapped " + Integer.toString(c) + " times"); // System.out.println(Integer.toString(c)); } }); f.addComponent(pushButton); f.addCommand(mBackCommand); f.addCommandListener(this); // Use setCommandListener() with LWUIT 1.3 or earlier. } return f; }
public Form getSupportMe() { if (frmSupportMe == null) { // --------------------------------------------- // Form f = ... frmSupportMe = new Form("Support Me"); frmSupportMe.setLayout(new BorderLayout()); Image bimage = null; try { bimage = Image.createImage("/images/metaLabSmall.png"); } catch (IOException ex) { ex.printStackTrace(); } Label bottomText = new Label(bimage); bottomText.setAlignment(Component.CENTER); bottomText.setText("Our Logo"); bottomText.setTextPosition(Component.BOTTOM); Container buttonBar = new Container(new BoxLayout(BoxLayout.X_AXIS)); buttonBar.addComponent(new Button("Add")); buttonBar.addComponent(new Button("Remove")); buttonBar.addComponent(new Button("Edit")); buttonBar.addComponent(new Button("Send")); buttonBar.addComponent(new Button("Exit")); frmSupportMe.addComponent(BorderLayout.CENTER, bottomText); frmSupportMe.addComponent(BorderLayout.SOUTH, buttonBar); frmSupportMe.addCommand(mBackCommand); frmSupportMe.addCommandListener(this); // Use setCommandListener() with LWUIT 1.3 or earlier. } return frmSupportMe; }
public Form getToDoList() { Form f = new Form("To Do List"); if (frmToDoList == null) { f.setLayout(new BoxLayout(BoxLayout.Y_AXIS)); Label sLabel = new Label("To Do List appears here"); f.addComponent(sLabel); f.addCommand(mBackCommand); f.addCommandListener(this); // Use setCommandListener() with LWUIT 1.3 or earlier. f.setTransitionInAnimator(Transition3D.createCube(300, false)); f.setTransitionOutAnimator(Transition3D.createCube(300, true)); } return f; }
public Form getSurveys() { if (frmSurveys == null) { frmSurveys = new Form("Surveys"); Label sLabel = new Label("Surveys On Board"); frmSurveys.addComponent(sLabel); frmSurveys.setLayout(new BoxLayout(BoxLayout.Y_AXIS)); RadioButton rb; ButtonGroup group = new ButtonGroup(); rb = new RadioButton("Grilled chicken"); group.add(rb); frmSurveys.addComponent(rb); rb = new RadioButton("Filet mignon"); group.add(rb); frmSurveys.addComponent(rb); rb = new RadioButton("Mahi mahi"); group.add(rb); frmSurveys.addComponent(rb); rb = new RadioButton("Chili"); group.add(rb); frmSurveys.addComponent(rb); CheckBox cb; cb = new CheckBox("Guacamole"); frmSurveys.addComponent(cb); cb = new CheckBox("Tabasco sauce"); frmSurveys.addComponent(cb); cb = new CheckBox("Mango salsa"); frmSurveys.addComponent(cb); cb = new CheckBox("Mayonnaise"); frmSurveys.addComponent(cb); cb = new CheckBox("Whipped cream"); frmSurveys.addComponent(cb); frmSurveys.addCommand(mBackCommand); frmSurveys.addCommandListener(this); // Use setCommandListener() with LWUIT 1.3 or earlier. } return frmSurveys; }
public Form getCalendar() { Form f = new Form("Calendar"); if (frmCalendar == null) { f.setLayout(new BoxLayout(BoxLayout.Y_AXIS)); Calendar cal = new Calendar(); f.addComponent(cal); f.addCommand(mBackCommand); f.addCommandListener(this); // Use setCommandListener() with LWUIT 1.3 or earlier. f.setTransitionInAnimator(Transition3D.createCube(300, false)); f.setTransitionOutAnimator(Transition3D.createCube(300, true)); } return f; }
/* public PIMBrowser getPimToDo() { if (pimToDo == null) { // write pre-init user code here pimToDo = new PIMBrowser(getDisplay(), PIM.TODO_LIST); pimToDo.setTitle("To Do List"); pimToDo.addCommand(PIMBrowser.SELECT_PIM_ITEM); pimToDo.addCommand(getBackCommand5()); pimToDo.setCommandListener(this); // write post-init user code here } return pimToDo; } */ public Form fullgetToDoList() { Form f = new Form("To Do List"); if (frmToDoList == null) { f.setLayout(new BoxLayout(BoxLayout.Y_AXIS)); toDoList = new List(); pim = PIM.getInstance(); f.addComponent(toDoList); final TextArea searchField = TextField.create(); f.addComponent(searchField); Button searchButton = new Button("Search"); searchButton.setPreferredW(f.getWidth() / 2 - 5); searchButton.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent evt) { populateToDoList(searchField.getText()); } }); Button clearButton = new Button("Clear"); clearButton.setPreferredW(f.getWidth() / 2 - 5); clearButton.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent evt) { searchField.setText(""); populateToDoList(""); } }); Container buttonContainer = new Container(); buttonContainer.setLayout(new BorderLayout()); buttonContainer.addComponent(BorderLayout.WEST, searchButton); buttonContainer.addComponent(BorderLayout.EAST, clearButton); f.addComponent(buttonContainer); populateToDoList(searchField.getText()); f.addCommand(mBackCommand); f.addCommandListener(this); // Use setCommandListener() with LWUIT 1.3 or earlier. f.setTransitionInAnimator(Transition3D.createCube(300, false)); f.setTransitionOutAnimator(Transition3D.createCube(300, true)); } return f; }
/** * Create the default view for this entity. The view contains all properties except References, * Collections and BinaryData. It has simple form with VerticalPanel, containing default widgets * for all properties, obtained from Property.widget() method * * @return The default view * @see Property */ protected View initDefaultView() { View retval = new View(this); Form form = new Form(true); Panel layout = Panel.column(); for (Property<? extends Serializable> prop : properties) { if (!((prop instanceof Reference) || (prop instanceof Collection) || (prop.getType().equals(BinaryData.class)))) { retval.addProperty(prop); } layout.add(prop.widget()); } form.setLayout(layout); retval.setForm(form); if (retval.getProperties().size() > 0) { Property<? extends Serializable> prop = retval.getProperties().get(0); retval.addSortDescriptor("Default", prop.getLocalizationKey(), SortItem.ascending(prop)); } return retval; }
public Form getTorch() { Form f = new Form("Torch"); if (frmTorch == null) { f.setLayout(new BoxLayout(BoxLayout.Y_AXIS)); Label sLabel = new Label("Torch"); f.addComponent(sLabel); /* UIManager uim = UIManager.getInstance(); Hashtable ht = new Hashtable(); ht.put("sel#" + Style.BG_COLOR, "d0d0ed"); ht.put(Style.BG_COLOR, "ffffff"); ht.put(Style.FG_COLOR, "000056"); uim.setThemeProps(ht); */ f.addCommand(mBackCommand); f.addCommandListener(this); // Use setCommandListener() with LWUIT 1.3 or earlier. f.setTransitionInAnimator(Transition3D.createCube(300, false)); f.setTransitionOutAnimator(Transition3D.createCube(300, true)); } return f; }
private void jbInit() throws Exception { hierarTreePanel.setEnabled(false); warehousePanel.setLayout(borderLayout1); warehouseForm.setVOClassName("org.jallinone.warehouse.java.WarehouseVO"); this.setTitle(ClientSettings.getInstance().getResources().getResource("warehouse detail")); buttonsPanel.setLayout(flowLayout1); flowLayout1.setAlignment(FlowLayout.LEFT); insertButton.setText("insertButton1"); reloadButton.setText("reloadButton1"); deleteButton.setText("deleteButton1"); warehouseForm.setInsertButton(insertButton); warehouseForm.setCopyButton(copyButton); warehouseForm.setEditButton(editButton); warehouseForm.setReloadButton(reloadButton); warehouseForm.setDeleteButton(deleteButton); warehouseForm.setSaveButton(saveButton); warehouseForm.setFunctionId("WAR01"); warehouseForm.setLayout(gridBagLayout1); controlZip.setAttributeName("zipWAR01"); controlZip.setCanCopy(true); controlZip.setLinkLabel(labelZip); controlZip.setMaxCharacters(20); controlProv.setAttributeName("provinceWAR01"); controlProv.setCanCopy(true); controlProv.setLinkLabel(labelProv); controlProv.setMaxCharacters(20); controlProv.setTrimText(true); controlProv.setUpperCase(true); controlCity.setAttributeName("cityWAR01"); controlCity.setCanCopy(true); controlCity.setLinkLabel(labelCity); controlAddress.setAttributeName("addressWAR01"); controlAddress.setCanCopy(true); controlAddress.setLinkLabel(labelAddress); labelAddress.setText("address"); controlCountry.setAttributeName("countryWAR01"); controlCountry.setCanCopy(true); controlCountry.setLinkLabel(labelCountry); controlCountry.setMaxCharacters(20); controlCountry.setTrimText(true); controlCountry.setUpperCase(true); labelZip.setText("zip"); labelCity.setText("city"); labelCountry.setText("country"); labelProv.setText("prov"); controlWarCode.setAttributeName("warehouseCodeWAR01"); controlWarCode.setLinkLabel(labelWarCode); controlWarCode.setMaxCharacters(20); controlWarCode.setRequired(true); controlWarCode.setRpadding(false); controlWarCode.setTrimText(true); controlWarCode.setUpperCase(true); controlWarCode.setEnabledOnEdit(false); labelWarCode.setText("warehouseCodeWAR01"); labelDescr.setText("descriptionWAR01"); controlDescr.setAttributeName("descriptionWAR01"); controlDescr.setLinkLabel(labelDescr); controlDescr.setRequired(true); labelCompanyCode.setText("companyCodeSys01WAR01"); controlCompaniesCombo.setAttributeName("companyCodeSys01WAR01"); controlCompaniesCombo.setCanCopy(true); controlCompaniesCombo.setLinkLabel(labelCompanyCode); controlCompaniesCombo.setRequired(true); controlCompaniesCombo.setEnabledOnEdit(false); labelRoles.setText("edit/delete warehouse role"); controlRoles.setAttributeName("progressiveSys04WAR01"); controlRoles.setDomainId("USERROLES"); controlRoles.setLinkLabel(labelRoles); locationsPanel.setLayout(borderLayout2); tabbedPane.add(warehousePanel, "warehousePanel"); this.getContentPane().add(buttonsPanel, BorderLayout.NORTH); this.getContentPane().add(tabbedPane, BorderLayout.CENTER); warehouseForm.add( labelZip, new GridBagConstraints( 3, 4, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); warehouseForm.add( labelCity, new GridBagConstraints( 0, 4, 2, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); warehouseForm.add( labelAddress, new GridBagConstraints( 0, 3, 2, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); warehouseForm.add( controlAddress, new GridBagConstraints( 2, 3, 3, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); warehouseForm.add( controlCity, new GridBagConstraints( 2, 4, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 100, 0)); warehouseForm.add( controlZip, new GridBagConstraints( 4, 4, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); warehouseForm.add( controlWarCode, new GridBagConstraints( 2, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 100, 0)); warehousePanel.add(warehouseForm, BorderLayout.CENTER); buttonsPanel.add(insertButton, null); buttonsPanel.add(copyButton, null); buttonsPanel.add(editButton, null); buttonsPanel.add(saveButton, null); buttonsPanel.add(reloadButton, null); buttonsPanel.add(deleteButton, null); buttonsPanel.add(navigatorBar, null); warehouseForm.add( labelWarCode, new GridBagConstraints( 0, 1, 2, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 5, 5), 0, 0)); warehouseForm.add( labelDescr, new GridBagConstraints( 0, 2, 2, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); warehouseForm.add( controlDescr, new GridBagConstraints( 2, 2, 3, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); warehouseForm.add( controlCountry, new GridBagConstraints( 4, 5, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); warehouseForm.add( labelCountry, new GridBagConstraints( 3, 5, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); warehouseForm.add( labelProv, new GridBagConstraints( 0, 5, 1, 2, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 0), 0, 0)); warehouseForm.add( controlProv, new GridBagConstraints( 2, 5, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); warehouseForm.add( labelCompanyCode, new GridBagConstraints( 0, 0, 2, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); tabbedPane.add(locationsPanel, "locationsPanel"); locationsPanel.add(split, BorderLayout.CENTER); split.setDividerLocation(150); split.add(hierarTreePanel, JSplitPane.LEFT); split.add(availPanel, JSplitPane.RIGHT); tabbedPane.add(bookedItemsPanel, "bookedItemsPanel"); tabbedPane.add(orderedItemsPanel, "orderedItemsPanel"); hierarTreePanel.setFunctionId("WAR01"); tabbedPane.setTitleAt( 0, ClientSettings.getInstance().getResources().getResource("warehouse detail")); tabbedPane.setTitleAt(1, ClientSettings.getInstance().getResources().getResource("positions")); tabbedPane.setTitleAt( 2, ClientSettings.getInstance().getResources().getResource("bookedItemsPanel")); tabbedPane.setTitleAt( 3, ClientSettings.getInstance().getResources().getResource("orderedItemsPanel")); warehouseForm.add( controlCompaniesCombo, new GridBagConstraints( 2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); warehouseForm.add( controlRoles, new GridBagConstraints( 2, 6, 1, 2, 0.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); warehouseForm.add( labelRoles, new GridBagConstraints( 0, 7, 2, 1, 0.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); }
public Form getChallenges() { Form f = new Form("Top Challenges"); if (frmChallenges == null) { f.setLayout(new BoxLayout(BoxLayout.Y_AXIS)); class Node { Object[] children; String value; public Node(String value, Object[] children) { this.children = children; this.value = value; } public String toString() { return value; } } TreeModel model = new TreeModel() { Node[] sillyTree = { new Node( "Energy Banner: 23 completed: 77 Rewards available", new Node[] { new Node( "CHALLENGE: Get together a minimum of 5 friends or family, create a Banner with energy-saving awareness message, display in your community", new Node[] {}), new Node("REWARD: R15 Airtime (only 77 Rewards remaining)", new Node[] {}), new Node( "TO WIN: Send in a photo of you and your friends holding the banner in your community", new Node[] {}), new Node("CLOSES: 21 June 2013", new Node[] {}), }), new Node("Well Watch", new Node[] {new Node("A", new Node[] {})}), new Node( "Hear Me, My Friend", new Node[] { new Node("A", new Node[] {}), }), }; public Vector getChildren(Object parent) { Node n = (Node) parent; Object[] nodes; if (parent == null) { nodes = sillyTree; } else { nodes = n.children; } Vector v = new Vector(); for (int iter = 0; iter < nodes.length; iter++) { v.addElement(nodes[iter]); } return v; } public boolean isLeaf(Object node) { Node n = (Node) node; return n.children == null || n.children.length == 0; } }; f.setLayout(new BorderLayout()); f.addComponent(BorderLayout.CENTER, new Tree(model)); /* f.addComponent(area); TextArea big = new TextArea("Keep your community clean and win lots of STUFF"); big.setGrowByContent(true); big.setEditable(false); f.addComponent(big); List list = new List(); list.addItem("Street Clean Up"); list.addItem("Drinking Water Clean-Up"); list.addItem("Deadland Tidy"); list.addItem("Tree Rescue"); f.addComponent(list); f.addComponent(new Tree(list)); */ f.addCommand(mBackCommand); f.addCommandListener(this); // Use setCommandListener() with LWUIT 1.3 or earlier. f.setTransitionInAnimator(Transition3D.createCube(300, false)); f.setTransitionOutAnimator(Transition3D.createCube(300, true)); } return f; }
private void createUI() { // Set up screen for transitions. mAwayForm = new Form("...placeholder ..."); mAwayForm.addComponent(new Label("Choose Back to return to the home screen.")); mBackCommand = new Command("Back"); mAwayForm.addCommand(mBackCommand); mAwayForm.addCommandListener(this); // Use setCommandListener() with LWUIT 1.3 or earlier. frmSurveys = getSurveys(); frmChallenges = getChallenges(); frmResources = getResources(); frmMessages = getMessages(); frmSupportMe = getSupportMe(); frmAboutUs = getAboutUs(); frmAboutYou = getAboutYou(); frmCalendar = getCalendar(); frmContacts = getContacts(); frmToDoList = getToDoList(); frmTorch = getTorch(); // Set up main screen. mHomeForm = new Form("Today"); mHomeForm.setLayout(new BoxLayout(BoxLayout.Y_AXIS)); btnChallengesFrm = new Button("Challenges"); btnChallengesFrm.addActionListener(this); mHomeForm.addComponent(btnChallengesFrm); btnSurveysFrm = new Button("Surveys"); btnSurveysFrm.addActionListener(this); mHomeForm.addComponent(btnSurveysFrm); btnResourceFrm = new Button("Resources"); btnResourceFrm.addActionListener(this); mHomeForm.addComponent(btnResourceFrm); mCubeButton = new Button("Messages"); mCubeButton.addActionListener(this); mHomeForm.addComponent(mCubeButton); btnSupportFrm = new Button("Support Me"); btnSupportFrm.addActionListener(this); mHomeForm.addComponent(btnSupportFrm); btnContactsFrm = new Button("Contacts"); btnContactsFrm.addActionListener(this); mHomeForm.addComponent(btnContactsFrm); btnCalendarFrm = new Button("Calendar"); btnCalendarFrm.addActionListener(this); mHomeForm.addComponent(btnCalendarFrm); btnToDoFrm = new Button("To Do"); btnToDoFrm.addActionListener(this); mHomeForm.addComponent(btnToDoFrm); mFilesButton = new Button("Files"); mFilesButton.addActionListener(this); mHomeForm.addComponent(mFilesButton); btnAboutUs = new Button("About Us"); btnAboutUs.addActionListener(this); mHomeForm.addComponent(btnAboutUs); btnAboutYou = new Button("About You"); btnAboutYou.addActionListener(this); mHomeForm.addComponent(btnAboutYou); btnTorch = new Button("Torch"); btnTorch.addActionListener(this); mHomeForm.addComponent(btnTorch); mExitCommand = new Command("Exit"); mHomeForm.addCommand(mExitCommand); mHomeForm.addCommandListener(this); // Use setCommandListener() with LWUIT 1.3 or earlier. }
private void jbInit() throws Exception { itemsGrid.setMaxNumberOfRowsOnInsert(50); impAllItemsButton.setToolTipText( ClientSettings.getInstance().getResources().getResource("import all items")); impAllItemsButton.addActionListener( new SupplierDetailFrame_impAllItemsButton_actionAdapter(this)); detailPanel.setLayout(gridBagLayout4); itemsGrid.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); supplierPanel.setVOClassName("org.jallinone.purchases.suppliers.java.DetailSupplierVO"); supplierPanel.addLinkedPanel(organizationPanel); titledBorder1 = new TitledBorder(""); titledBorder2 = new TitledBorder(""); subjectPanel.setLayout(gridBagLayout1); supplierPanel.setBorder(titledBorder1); supplierPanel.setLayout(gridBagLayout2); titledBorder1.setTitle(ClientSettings.getInstance().getResources().getResource("supplier")); titledBorder1.setTitleColor(Color.blue); labelSupplierCode.setText("supplierCodePUR01"); labelPay.setText("payment terms"); labelBank.setText("bank"); controlSupplierCode.setAttributeName("supplierCodePUR01"); controlSupplierCode.setCanCopy(false); controlSupplierCode.setLinkLabel(labelSupplierCode); controlSupplierCode.setMaxCharacters(20); // controlSupplierCode.setRequired(true); controlSupplierCode.setTrimText(true); controlSupplierCode.setUpperCase(true); controlSupplierCode.setEnabledOnEdit(false); controlPayment.setAttributeName("paymentCodeReg10PUR01"); controlPayment.setCanCopy(true); controlPayment.setLinkLabel(labelPay); controlPayment.setMaxCharacters(20); controlPayment.setRequired(true); controlPayDescr.setAttributeName("paymentDescriptionSYS10"); controlPayDescr.setCanCopy(true); controlPayDescr.setEnabledOnInsert(false); controlPayDescr.setEnabledOnEdit(false); controlBank.setAttributeName("bankCodeReg12PUR01"); controlBank.setCanCopy(true); controlBank.setLinkLabel(labelBank); controlBank.setMaxCharacters(20); controlBankDescr.setAttributeName("descriptionREG12"); controlBankDescr.setCanCopy(true); controlBankDescr.setEnabledOnInsert(false); controlBankDescr.setEnabledOnEdit(false); refPanel.setLayout(borderLayout1); hierarPanel.setLayout(borderLayout4); treeGridItemsPanel.setLayout(borderLayout3); itemsSplitPane.setOrientation(JSplitPane.HORIZONTAL_SPLIT); itemsSplitPane.setDividerSize(5); itemsPanel.setLayout(borderLayout5); itemButtonsPanel.setLayout(flowLayout2); flowLayout2.setAlignment(FlowLayout.LEFT); itemsGrid.setAutoLoadData(false); itemsGrid.setDeleteButton(deleteButton1); itemsGrid.setEditButton(editButton1); itemsGrid.setExportButton(exportButton1); itemsGrid.setFunctionId("PUR01"); itemsGrid.setMaxSortedColumns(3); itemsGrid.setInsertButton(insertButton1); itemsGrid.setNavBar(navigatorBar1); itemsGrid.setReloadButton(reloadButton1); itemsGrid.setSaveButton(saveButton1); itemsGrid.setValueObjectClassName("org.jallinone.purchases.items.java.SupplierItemVO"); insertButton1.setText("insertButton1"); editButton1.setText("editButton1"); saveButton1.setText("saveButton1"); reloadButton1.setText("reloadButton1"); deleteButton1.setText("deleteButton1"); itemHierarsPanel.setLayout(gridBagLayout3); labelHierar.setText("item hierarchies"); colItemCode.setColumnFilterable(true); colItemCode.setColumnName("itemCodeItm01PUR02"); colItemCode.setColumnSortable(true); colItemCode.setEditableOnInsert(true); colItemCode.setHeaderColumnName("itemCodeITM01"); colItemCode.setPreferredWidth(90); colItemCode.setSortVersus(org.openswing.swing.util.java.Consts.ASC_SORTED); colItemCode.setMaxCharacters(20); colItemDescr.setColumnFilterable(true); colItemDescr.setColumnName("descriptionSYS10"); colItemDescr.setColumnSortable(true); colItemDescr.setHeaderColumnName("itemDescriptionSYS10"); colItemDescr.setPreferredWidth(200); colSupplierItemCode.setMaxCharacters(20); colSupplierItemCode.setTrimText(true); colSupplierItemCode.setUpperCase(true); colSupplierItemCode.setColumnFilterable(true); colSupplierItemCode.setColumnName("supplierItemCodePUR02"); colSupplierItemCode.setColumnSortable(true); colSupplierItemCode.setEditableOnEdit(true); colSupplierItemCode.setEditableOnInsert(true); colSupplierItemCode.setHeaderColumnName("supplierItemCodePUR02"); colSupplierItemCode.setPreferredWidth(120); colUmCode.setColumnDuplicable(true); colUmCode.setColumnFilterable(true); colUmCode.setColumnName("umCodeReg02PUR02"); colUmCode.setEditableOnEdit(true); colUmCode.setEditableOnInsert(true); colUmCode.setHeaderColumnName("umCodeReg02PUR02"); colUmCode.setMaxCharacters(20); colMinQty.setDecimals(2); colMinQty.setGrouping(false); colMinQty.setColumnDuplicable(true); colMinQty.setColumnFilterable(true); colMinQty.setColumnSortable(true); colMinQty.setEditableOnEdit(true); colMinQty.setEditableOnInsert(true); colMinQty.setPreferredWidth(80); colMinQty.setColumnName("minPurchaseQtyPUR02"); colMultipleQty.setGrouping(false); colMultipleQty.setColumnDuplicable(true); colMultipleQty.setColumnFilterable(true); colMultipleQty.setColumnSortable(true); colMultipleQty.setEditableOnEdit(true); colMultipleQty.setEditableOnInsert(true); colMultipleQty.setPreferredWidth(80); colMultipleQty.setColumnName("multipleQtyPUR02"); subjectPanel.add( organizationPanel, new GridBagConstraints( 0, 1, 1, 1, 1.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); this.setTitle(ClientSettings.getInstance().getResources().getResource("supplier detail")); buttonsPanel.setLayout(flowLayout1); flowLayout1.setAlignment(FlowLayout.LEFT); insertButton.setText("insertButton1"); editButton.setText("editButton1"); saveButton.setEnabled(false); saveButton.setText("saveButton1"); reloadButton.setText("reloadButton1"); deleteButton.setText("deleteButton1"); labelCompanyCode.setText("companyCodeSys01REG04"); controlCompanyCode.setAttributeName("companyCodeSys01REG04"); controlCompanyCode.setLinkLabel(labelCompanyCode); controlCompanyCode.setRequired(true); controlCompanyCode.setEnabledOnEdit(false); this.getContentPane().add(buttonsPanel, BorderLayout.NORTH); buttonsPanel.add(insertButton, null); buttonsPanel.add(editButton, null); buttonsPanel.add(saveButton, null); buttonsPanel.add(reloadButton, null); buttonsPanel.add(deleteButton, null); buttonsPanel.add(navigatorBar, null); // tabbedPane.add(subjectPanel, "generic data"); this.getContentPane().add(tabbedPane, BorderLayout.CENTER); supplierPanel.add( labelCompanyCode, new GridBagConstraints( 0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); supplierPanel.add( controlCompanyCode, new GridBagConstraints( 1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); // tabbedPane.add(supplierPanel, "supplierPanel"); supplierPanel.add( labelSupplierCode, new GridBagConstraints( 0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 5, 5), 0, 0)); supplierPanel.add( controlSupplierCode, new GridBagConstraints( 1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); supplierPanel.add( labelPay, new GridBagConstraints( 0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); supplierPanel.add( controlPayment, new GridBagConstraints( 1, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 40, 0)); supplierPanel.add( controlPayDescr, new GridBagConstraints( 2, 2, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); supplierPanel.add( labelPricelist, new GridBagConstraints( 0, 3, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); supplierPanel.add( labelBank, new GridBagConstraints( 0, 4, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0)); supplierPanel.add( controlBank, new GridBagConstraints( 1, 4, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 40, 0)); supplierPanel.add( controlBankDescr, new GridBagConstraints( 2, 4, 2, 3, 1.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 0, 5), 0, 0)); supplierPanel.add( labelDebit, new GridBagConstraints( 0, 5, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); supplierPanel.add( labelPurchase, new GridBagConstraints( 0, 6, 1, 1, 0.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 15, 5), 0, 0)); supplierPanel.add( controlDebitsCode, new GridBagConstraints( 1, 5, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 40, 0)); supplierPanel.add( controlDebitsDescr, new GridBagConstraints( 2, 5, 2, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 0, 5), 0, 0)); supplierPanel.add( controlCostsCode, new GridBagConstraints( 1, 6, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 40, 0)); supplierPanel.add( controlCostsDescr, new GridBagConstraints( 2, 6, 2, 3, 1.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 0, 5), 0, 0)); labelDebit.setText("debits account"); labelPurchase.setText("purchase costs account"); controlDebitsCode.setAttributeName("debitAccountCodeAcc02PUR01"); controlDebitsDescr.setAttributeName("debitAccountDescrPUR01"); controlCostsCode.setAttributeName("costsAccountCodeAcc02PUR01"); controlCostsDescr.setAttributeName("costsAccountDescrPUR01"); detailPanel.add( subjectPanel, new GridBagConstraints( 0, 0, 1, 1, 1.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 0, 0)); detailPanel.add( supplierPanel, new GridBagConstraints( 0, 1, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); tabbedPane.add(detailPanel, "supplier data"); tabbedPane.add(refPanel, "references"); refPanel.add(referencesPanel, BorderLayout.CENTER); tabbedPane.add(hierarPanel, "hierarchies"); hierarPanel.add(hierarchiesPanel, BorderLayout.CENTER); tabbedPane.add(treeGridItemsPanel, "supplierItems"); treeGridItemsPanel.add(itemsSplitPane, BorderLayout.CENTER); itemsSplitPane.add(treePanel, JSplitPane.LEFT); itemsSplitPane.add(itemsPanel, JSplitPane.RIGHT); itemsPanel.add(itemButtonsPanel, BorderLayout.NORTH); itemsPanel.add(itemsGrid, BorderLayout.CENTER); itemsGrid.getColumnContainer().add(colItemCode, null); itemButtonsPanel.add(insertButton1, null); itemButtonsPanel.add(editButton1, null); itemButtonsPanel.add(saveButton1, null); itemButtonsPanel.add(reloadButton1, null); itemButtonsPanel.add(deleteButton1, null); itemButtonsPanel.add(exportButton1, null); itemButtonsPanel.add(navigatorBar1, null); itemButtonsPanel.add(impAllItemsButton, null); controlDebitsCode.setLinkLabel(labelDebit); controlDebitsCode.setMaxCharacters(20); controlDebitsCode.setRequired(true); controlDebitsDescr.setEnabledOnInsert(false); controlDebitsDescr.setEnabledOnEdit(false); controlCostsCode.setLinkLabel(labelPurchase); controlCostsCode.setMaxCharacters(20); controlCostsCode.setRequired(true); controlCostsDescr.setEnabledOnInsert(false); controlCostsDescr.setEnabledOnEdit(false); treeGridItemsPanel.add(itemHierarsPanel, BorderLayout.NORTH); itemHierarsPanel.add( labelHierar, new GridBagConstraints( 0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 0), 0, 0)); itemHierarsPanel.add( controlHierarchy, new GridBagConstraints( 1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 100, 0)); tabbedPane.add(supplierPricelistPanel, "supplierPricelistPanel"); itemsGrid.getColumnContainer().add(colItemDescr, null); itemsGrid.getColumnContainer().add(colSupplierItemCode, null); itemsGrid.getColumnContainer().add(colUmCode, null); itemsGrid.getColumnContainer().add(colMinQty, null); itemsGrid.getColumnContainer().add(colMultipleQty, null); tabbedPane.setTitleAt( 0, ClientSettings.getInstance().getResources().getResource("supplier data")); tabbedPane.setTitleAt(1, ClientSettings.getInstance().getResources().getResource("references")); tabbedPane.setTitleAt( 2, ClientSettings.getInstance().getResources().getResource("hierarchies")); tabbedPane.setTitleAt( 3, ClientSettings.getInstance().getResources().getResource("supplierItems")); tabbedPane.setTitleAt( 4, ClientSettings.getInstance().getResources().getResource("supplierPricelists")); itemsSplitPane.setDividerLocation(200); }