@Override public void clear() { if (current != null) { final Tab tab = owner.getTab(current); if (tab != null) { owner.removeTab(tab); } current = null; previous = null; } }
private void hideTabSheet() { if (mainTab == null) { mainTab = ui.getMainTab(); } if (mainTab != null) { tab = mainTab.getTab(this); if (tab != null) { tab.setEnabled(false); } } }
/** Shows the tab and put into the foreground, if no query is executed yet. */ private void showTab() { if (mainTab == null) { mainTab = ui.getMainTab(); } if (mainTab != null) { tab = mainTab.getTab(this); tab.getComponent().addStyleName("example-queries-tab"); tab.setEnabled(true); if (!(mainTab.getSelectedTab() instanceof ResultViewPanel)) { mainTab.setSelectedTab(tab); } } }
public void setFormButtonAndTextState() { // KODE REFNO SELALU READ ONLY KARENA OTOMATIS if (model.getOperationStatus().equals(EnumOperationStatus.OPEN.getStrCode())) { tabSheet.setSelectedTab(panelUtamaDetil); tabSheet.getTab(panelUtamaList).setEnabled(true); btnNewForm.setEnabled(true); btnEditForm.setEnabled(true); btnDeleteForm.setEnabled(true); btnSearch.setEnabled(true); btnPosting.setEnabled(true); btnAddItem.setEnabled(false); btnEditItem.setEnabled(false); btnRemoveItem.setEnabled(false); btnSaveForm.setEnabled(false); btnCancelForm.setEnabled(false); tableDetil.setReadOnly(true); fieldNomor.setReadOnly(true); fieldAmount.setReadOnly(true); fieldAmountafterppn.setReadOnly(true); fieldDisc1.setReadOnly(true); fieldDisc1rp.setReadOnly(true); fieldDisc1rpafterppn.setReadOnly(true); fieldDisc2.setReadOnly(true); fieldDisc2rp.setReadOnly(true); fieldDisc2rpafterppn.setReadOnly(true); fieldDisc.setReadOnly(true); fieldDiscrp.setReadOnly(true); fieldDiscrpafterppn.setReadOnly(true); fieldPpnpercent.setReadOnly(true); fieldPpnrp.setReadOnly(true); fieldAmountafterdisc.setReadOnly(true); fieldAmountafterdiscafterppn.setReadOnly(true); } else if (model.getOperationStatus().equals(EnumOperationStatus.ADDING.getStrCode())) { tabSheet.setSelectedTab(panelUtamaDetil); tabSheet.getTab(panelUtamaList).setEnabled(false); btnNewForm.setEnabled(false); btnEditForm.setEnabled(false); btnDeleteForm.setEnabled(false); btnSearch.setEnabled(false); btnPosting.setEnabled(false); btnAddItem.setEnabled(true); btnEditItem.setEnabled(true); btnRemoveItem.setEnabled(true); btnSaveForm.setEnabled(true); btnCancelForm.setEnabled(true); tableDetil.setReadOnly(false); fieldNomor.setReadOnly(true); fieldAmount.setReadOnly(false); fieldAmountafterppn.setReadOnly(false); fieldDisc1.setReadOnly(false); fieldDisc1rp.setReadOnly(false); fieldDisc1rpafterppn.setReadOnly(false); fieldDisc2.setReadOnly(false); fieldDisc2rp.setReadOnly(false); fieldDisc2rpafterppn.setReadOnly(false); fieldDisc.setReadOnly(false); fieldDiscrp.setReadOnly(false); fieldDiscrpafterppn.setReadOnly(false); fieldPpnpercent.setReadOnly(false); fieldPpnrp.setReadOnly(false); fieldAmountafterdisc.setReadOnly(false); fieldAmountafterdiscafterppn.setReadOnly(false); } else if (model.getOperationStatus().equals(EnumOperationStatus.EDITING.getStrCode())) { tabSheet.setSelectedTab(panelUtamaDetil); tabSheet.getTab(panelUtamaList).setEnabled(false); btnNewForm.setEnabled(false); btnEditForm.setEnabled(false); btnDeleteForm.setEnabled(false); btnSearch.setEnabled(false); btnPosting.setEnabled(false); btnAddItem.setEnabled(true); btnEditItem.setEnabled(true); btnRemoveItem.setEnabled(true); btnSaveForm.setEnabled(true); btnCancelForm.setEnabled(true); tableDetil.setReadOnly(false); fieldNomor.setReadOnly(false); fieldAmount.setReadOnly(false); fieldAmountafterppn.setReadOnly(false); fieldDisc1.setReadOnly(false); fieldDisc1rp.setReadOnly(false); fieldDisc1rpafterppn.setReadOnly(false); fieldDisc2.setReadOnly(false); fieldDisc2rp.setReadOnly(false); fieldDisc2rpafterppn.setReadOnly(false); fieldDisc.setReadOnly(false); fieldDiscrp.setReadOnly(false); fieldDiscrpafterppn.setReadOnly(false); fieldPpnpercent.setReadOnly(false); fieldPpnrp.setReadOnly(false); fieldAmountafterdisc.setReadOnly(false); fieldAmountafterdiscafterppn.setReadOnly(false); } if (checkPosting.getValue() == true) { btnPosting.setEnabled(false); btnPostingBatal.setEnabled(true); } else { btnPosting.setEnabled(true); btnPostingBatal.setEnabled(false); } checkEndofday.setReadOnly(true); checkPosting.setReadOnly(true); }
@Override protected void updateLabels() { tabSheetClient .getTab(TAB_GENERAL) .setCaption( getI18N() .getMessage( "com.thingtrack.konekti.view.web.form.ClientViewForm.tabSheetClient.generalTab")); tabSheetClient .getTab(TAB_ADDRESS) .setCaption( getI18N() .getMessage( "com.thingtrack.konekti.view.web.form.ClientViewForm.tabSheetClient.addressTab")); tabSheetClient .getTab(TAB_SECURITY) .setCaption( getI18N() .getMessage( "com.thingtrack.konekti.view.web.form.ClientViewForm.tabSheetClient.securityTab")); tabSheetClient .getTab(TAB_ORGANIZATION) .setCaption( getI18N() .getMessage( "com.thingtrack.konekti.view.web.form.ClientViewForm.tabSheetClient.organizationTab")); tabSheetClient .getTab(TAB_APPLICATION) .setCaption( getI18N() .getMessage( "com.thingtrack.konekti.view.web.form.ClientViewForm.tabSheetClient.applicationTab")); tabSheetClient .getTab(TAB_ROL) .setCaption( getI18N() .getMessage( "com.thingtrack.konekti.view.web.form.ClientViewForm.tabSheetClient.roleTab")); codeField.setCaption( getI18N() .getMessage("com.thingtrack.konekti.view.web.form.ClientViewForm.codeField.caption")); nameField.setCaption( getI18N() .getMessage("com.thingtrack.konekti.view.web.form.ClientViewForm.nameField.caption")); activeField.setCaption( getI18N() .getMessage("com.thingtrack.konekti.view.web.form.ClientViewForm.activeField.caption")); vatField.setCaption( getI18N() .getMessage("com.thingtrack.konekti.view.web.form.ClientViewForm.vatField.caption")); clientTypeField.setCaption( getI18N() .getMessage( "com.thingtrack.konekti.view.web.form.ClientViewForm.clientTypeField.caption")); clientGroupField.setCaption( getI18N() .getMessage( "com.thingtrack.konekti.view.web.form.ClientViewForm.clientGroupField.caption")); phoneField.setCaption( getI18N() .getMessage("com.thingtrack.konekti.view.web.form.ClientViewForm.phoneField.caption")); faxField.setCaption( getI18N() .getMessage("com.thingtrack.konekti.view.web.form.ClientViewForm.faxField.caption")); facebookIdField.setCaption( getI18N() .getMessage( "com.thingtrack.konekti.view.web.form.ClientViewForm.facebookIdField.caption")); mobileField.setCaption( getI18N() .getMessage("com.thingtrack.konekti.view.web.form.ClientViewForm.mobileField.caption")); descriptionField.setCaption( getI18N() .getMessage( "com.thingtrack.konekti.view.web.form.ClientViewForm.descriptionField.caption")); commentField.setCaption( getI18N() .getMessage( "com.thingtrack.konekti.view.web.form.ClientViewForm.commentField.caption")); emailField.setCaption( getI18N() .getMessage("com.thingtrack.konekti.view.web.form.ClientViewForm.emailField.caption")); }