本文整理了Java中org.eclipse.swt.widgets.Table.getParent()
方法的一些代码示例,展示了Table.getParent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.getParent()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Table
类名称:Table
方法名:getParent
暂无
代码示例来源:origin: org.apache.uima/uimaj-ep-pear-packager
/**
* Return the parent composite.
*
* @return the control
*/
public Control getControl() {
return table.getParent();
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface
Composite getComposite(Widget column) {
return ((TableColumn) column).getParent().getParent();
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface
Composite getComposite(Widget column) {
return ((TableColumn) column).getParent().getParent();
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface
Composite getComposite(Widget column) {
return ((TableColumn) column).getParent().getParent();
}
代码示例来源:origin: com.github.rinde/rinsim-pdptw
@Override
public void render() {
if (table.getItemCount() < list.size()) {
for (int i = table.getItemCount(); i < list.size(); i++) {
createItem(list.get(i));
}
}
for (int i = 0; i < table.getItemCount(); i++) {
final RouteFollowingVehicle v = list.get(i);
table.getItem(i).setText(1, Integer.toString(v.getRoute().size()));
table.getItem(i).setText(2, v.getRoute().toString());
}
table.getParent().redraw();
table.getParent().layout();
}
代码示例来源:origin: rinde/RinSim
@Override
public void render() {
if (table.getItemCount() < list.size()) {
for (int i = table.getItemCount(); i < list.size(); i++) {
createItem(list.get(i));
}
}
for (int i = 0; i < table.getItemCount(); i++) {
final RouteFollowingVehicle v = list.get(i);
table.getItem(i).setText(1, Integer.toString(v.getRoute().size()));
table.getItem(i).setText(2, v.getRoute().toString());
}
table.getParent().redraw();
table.getParent().layout();
}
代码示例来源:origin: org.apache.uima/uimaj-ep-configurator
@Override
public void refresh() {
super.refresh();
table.getParent().setRedraw(false);
table.removeAll();
if (isPrimitive())
addPrimitiveToGUI("", editor.getAeDescription());
else { // is aggregate
for (Iterator it = editor.getResolvedDelegates().entrySet().iterator(); it.hasNext();) {
Map.Entry item = (Map.Entry) it.next();
addDelegateToGUI("", (String) item.getKey(), (ResourceSpecifier) item.getValue());
}
FlowControllerDeclaration fcd = editor.getResolvedFlowControllerDeclaration();
if (null != fcd) {
addDelegateToGUI("", fcd.getKey(), fcd.getSpecifier());
}
}
enable();
table.getParent().setRedraw(true);
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface
/**
* @since 1.3
*/
protected void updateColumnData(Widget column) {
TableColumn tColumn = (TableColumn) column;
Table t = tColumn.getParent();
if( ! IS_GTK || t.getColumn(t.getColumnCount()-1) != tColumn ){
tColumn.setData(LAYOUT_DATA,
new ColumnPixelData(tColumn.getWidth()));
layout(t.getParent(), true);
}
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface
/**
* @since 3.5
*/
@Override
protected void updateColumnData(Widget column) {
TableColumn tColumn = (TableColumn) column;
Table t = tColumn.getParent();
if (!IS_GTK || t.getColumn(t.getColumnCount() - 1) != tColumn) {
tColumn.setData(LAYOUT_DATA,
new ColumnPixelData(tColumn.getWidth()));
layout(t.getParent(), true);
}
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface
/**
* @since 3.5
*/
@Override
protected void updateColumnData(Widget column) {
TableColumn tColumn = (TableColumn) column;
Table t = tColumn.getParent();
if (!IS_GTK || t.getColumn(t.getColumnCount() - 1) != tColumn) {
tColumn.setData(LAYOUT_DATA,
new ColumnPixelData(tColumn.getWidth()));
layout(t.getParent(), true);
}
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.debug.ui
/**
* This method estimates the number of visible lines in the rendering
* table.
* @return estimated number of visible lines in the table
*/
private int getNumberOfVisibleLines()
{
if(fTableViewer == null) {
return -1;
}
Table table = fTableViewer.getTable();
int height = fTableViewer.getTable().getSize().y;
// when table is not yet created, height is zero
if (height == 0)
{
// make use of the table viewer to estimate table size
height = fTableViewer.getTable().getParent().getSize().y;
}
int numberOfLines = doGetNumberOfVisibleLines(table, height);
if (numberOfLines <= 0)
{
return 0;
}
return numberOfLines;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.debug.ui
private int getNumberOfVisibleLines() {
Table table = getTable();
int height = table.getSize().y;
// when table is not yet created, height is zero
if (height == 0) {
// make use of the table viewer to estimate table size
height = table.getParent().getSize().y;
}
// height of border
int border = table.getHeaderHeight();
// height of scroll bar
int scroll = table.getHorizontalBar().getSize().y;
// height of table is table's area minus border and scroll bar height
height = height - border - scroll;
// calculate number of visible lines
int lineHeight = getMinTableItemHeight(table);
int numberOfLines = height / lineHeight;
if (numberOfLines <= 0) {
return 20;
}
return numberOfLines;
}
代码示例来源:origin: org.xworker/xworker_swt
public void run(){
try{
for(DataObject record : records){
for(TableItem item : table.getItems()){
DataObject itemRecord = (DataObject) item.getData("_store_record");
if(record == itemRecord){
//log.info("DataStore: update table item");
String[] texts = (String[]) self.doAction("recordToRowTexts", actionContext, UtilMap.toMap(new Object[]{"record", record}));
item.setText(texts);
if((table.getStyle() & SWT.CHECK) == SWT.CHECK){
if(record.getBoolean(DataObject.CHECKED_ATTRIBUTE_NAME)){
item.setChecked(true);
}else{
item.setChecked(false);
}
}
}
}
}
table.getParent().layout();
}catch(Throwable t){
log.error("TableDataStoreListener onUpdate error", t);
}
}
});
代码示例来源:origin: org.eclipse.platform/org.eclipse.debug.ui
height = fTableViewer.getTable().getParent().getSize().y;
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
layout.setColumnData(columnType, new ColumnWeightData(50, convertWidthInCharsToPixels(20), true));
layout.setColumnData(columnName, new ColumnWeightData(50, convertWidthInCharsToPixels(20), true));
tv.getTable().getParent().setLayout(layout);
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
layout.setColumnData(columnType, new ColumnWeightData(50, convertWidthInCharsToPixels(20), true));
layout.setColumnData(columnName, new ColumnWeightData(50, convertWidthInCharsToPixels(20), true));
tv.getTable().getParent().setLayout(layout);
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
@Override
public void renderInitialization( Table table ) throws IOException {
RemoteObject remoteObject = createRemoteObject( table, TYPE );
remoteObject.setHandler( new TableOperationHandler( table ) );
remoteObject.set( "parent", getId( table.getParent() ) );
remoteObject.set( "style", createJsonArray( getStyles( table, ALLOWED_STYLES ) ) );
remoteObject.set( "appearance", "table" );
ITableAdapter adapter = getTableAdapter( table );
if( ( table.getStyle() & SWT.CHECK ) != 0 ) {
JsonArray metrics = new JsonArray()
.add( adapter.getCheckLeft() )
.add( adapter.getCheckWidth() );
remoteObject.set( "checkBoxMetrics", metrics );
}
if( getFixedColumns( table ) >= 0 ) {
remoteObject.set( "splitContainer", true );
}
remoteObject.set( "indentionWidth", 0 );
remoteObject.set( PROP_TREE_COLUMN, -1 );
remoteObject.set( PROP_MARKUP_ENABLED, isMarkupEnabledFor( table ) );
TemplateLCAUtil.renderRowTemplate( table );
remoteObject.listen( PROP_SETDATA_LISTENER, isVirtual( table ) );
}
内容来源于网络,如有侵权,请联系作者删除!