use of com.google.gwt.dom.client.TableRowElement in project drools-wb by kiegroup.
the class TemplateDataHeaderWidget method setCursorType.
// Set the cursor type for all cells on the table as
// we only use rowHeader[0] to check which column
// needs resizing however the mouse could be over any
// row
private void setCursorType(Cursor cursor) {
for (int iRow = 0; iRow < widget.headerRows.length; iRow++) {
TableRowElement tre = widget.headerRows[iRow].<TableRowElement>cast();
for (int iCol = 0; iCol < tre.getCells().getLength(); iCol++) {
TableCellElement tce = tre.getCells().getItem(iCol);
tce.getStyle().setCursor(cursor);
}
}
}
use of com.google.gwt.dom.client.TableRowElement in project gwt-test-utils by gwt-test-utils.
the class GridPatcher method createRow.
private static TableRowElement createRow(int columns, String cellContent) {
TableRowElement tr = Document.get().createTRElement();
for (int i = 0; i < columns; i++) {
TableCellElement cell = Document.get().createTDElement();
cell.setInnerHTML(cellContent);
tr.appendChild(cell);
}
return tr;
}
use of com.google.gwt.dom.client.TableRowElement in project gwt-test-utils by gwt-test-utils.
the class TableSectionElementPatcher method deleteRow.
@PatchMethod
static void deleteRow(TableSectionElement e, int index) {
NodeList<TableRowElement> rows = e.getRows();
if (rows.getLength() < 1) {
return;
}
if (index == -1) {
index = rows.getLength() - 1;
}
TableRowElement rowToDelete = rows.getItem(index);
e.removeChild(rowToDelete);
}
use of com.google.gwt.dom.client.TableRowElement in project rstudio by rstudio.
the class DirectoryContentsWidget method addDirectory.
public void addDirectory(FileSystemItem directory) {
int rowNum = addItem(directory, null, null);
TableElement table = (TableElement) table_.getElement().cast();
TableRowElement row = table.getRows().getItem(rowNum);
row.scrollIntoView();
scrollPanel_.setHorizontalScrollPosition(0);
setSelectedRow(rowNum);
}
use of com.google.gwt.dom.client.TableRowElement in project rstudio by rstudio.
the class ModifyKeyboardShortcutsWidget method updateData.
private void updateData(List<KeyboardShortcutEntry> bindings) {
dataProvider_.setList(bindings);
// Loop through and update styling on each row.
for (int i = 0; i < bindings.size(); i++) {
KeyboardShortcutEntry binding = bindings.get(i);
if (binding.isCustomBinding() || binding.isModified()) {
TableRowElement rowEl = table_.getRowElement(i);
DomUtils.toggleClass(rowEl, RES.dataGridStyle().customBindingRow(), binding.isCustomBinding());
DomUtils.toggleClass(rowEl, RES.dataGridStyle().modifiedRow(), binding.isModified());
}
}
// something we could live with.
for (int i = 0; i < bindings.size(); i++) {
KeyboardShortcutEntry cb1 = bindings.get(i);
if (cb1.getKeySequence() == null || cb1.getKeySequence().isEmpty())
continue;
for (int j = 0; j < originalBindings_.size(); j++) {
KeyboardShortcutEntry cb2 = originalBindings_.get(j);
if (cb1.equals(cb2))
continue;
int t1 = cb1.getCommandType();
int t2 = cb2.getCommandType();
// 'dynamic' commands as handled with AppCommands
if (t1 == t2 && cb1.getContext() != cb2.getContext())
continue;
KeySequence ks1 = cb1.getKeySequence();
KeySequence ks2 = cb2.getKeySequence();
if (ks1 == null || ks2 == null || ks1.isEmpty() || ks2.isEmpty())
continue;
boolean hasConflict = ks1.equals(ks2) || ks1.startsWith(ks2, true) || ks2.startsWith(ks1, true);
if (hasConflict) {
// editor commands can be masked by AppCommands and addins
if (t1 == KeyboardShortcutEntry.TYPE_EDITOR_COMMAND && t1 != t2)
addMaskedCommandStyles(i, j, cb2);
else // addins can mask both AppCommands and editor commands
if (t2 == KeyboardShortcutEntry.TYPE_ADDIN && t1 != t2)
addMaskedCommandStyles(i, j, cb2);
else // two commands with the same binding in the same 'group' == conflict
if (t1 == t2)
addConflictCommandStyles(i, j, cb2);
}
}
}
}
Aggregations