All Downloads are FREE. Search and download functionalities are using the official Maven repository.

fr.ird.observe.client.form.table.DataTableFormUI.jcss Maven / Gradle / Ivy

/*
 * #%L
 * ObServe :: Client
 * %%
 * Copyright (C) 2008 - 2017 IRD, Code Lutin, Ultreia.io
 * %%
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as
 * published by the Free Software Foundation, either version 3 of the 
 * License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public 
 * License along with this program.  If not, see
 * .
 * #L%
 */

#model {
  valid:{getValidator().isValid() && getValidatorTable().isValid()};
  modified:{tableModel.isModified() || getValidator().isChanged()};
  canSaveRow:{getValidatorTable().isChanged() && getValidatorTable().isValid()};
  canResetRow:{getValidatorTable().isChanged()};
  editable:true;
  enabled:{!model.isReadingMode()};
}

#body {
  layout:{new BorderLayout()};
}

#tableModel {
  editable:{!model.isReadingMode()};
}

#selectionModel {
  selectionMode:{ListSelectionModel.SINGLE_SELECTION};
}

#editorBlockLayerUI {
  block:{!tableModel.isEditable()};
}

#tableScrollPane {
  columnHeaderView:{table.getTableHeader()};
  minimumSize:{new Dimension(10, 100)};
}

#table {
  model:{tableModel};
  selectionModel:{selectionModel};
  rowSelectionAllowed:true;
  autoResizeMode:2;
  fillsViewportHeight:true;
}

#editor {
  border:{new TitledBorder("")};
}

#editorPanel {
  visible:{!tableModel.isEmpty()};
}

#editorActions {
  visible:{tableModel.isEditable()};
}

#newEntry {
  _text:{t(getNewEntryText())};
  _toolTipText:{t(getNewEntryTip())};
  visible:{tableModel.isEditable() && !tableModel.isCreate()};
}

#resetEntry {
  _text:{t(getResetEntryText())};
  _toolTipText:{t(getResetEntryTip())};
  enabled:{tableModel.isCreate() || model.isCanResetRow()};
  visible:{tableModel.isEditable() && (tableModel.isCreate() || !tableModel.isEmpty())};
}

#saveEntry {
  visible:{tableModel.isEditable() && !tableModel.isEmpty()};
  enabled:{model.isCanSaveRow()};
}

#deleteEntry {
  _text:{t(getDeleteEntryText())};
  _toolTipText:{t(getDeleteEntryTip())};
  visible:{tableModel.isEditable() && !tableModel.isEmpty() && !tableModel.isCreate()};
}

#up {
  visible:{!model.isCreatingMode()};
}

#reset {
  visible:{model.isEnabled()};
  enabled:{model.isModified()};
}

#save {
  _toolTipText:{t("observe.action.save.all.tip")};
  visible:{model.isEnabled()};
  enabled:{model.isModified() && model.isValid() && !tableModel.isCreate()};
}

#hideFormInformation {
  actionIcon:"information";
  font-size:11;
  verticalAlignment:"center";
  horizontalAlignment:"center";
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy