Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRĂ¼diger Herrmann2011-01-28 14:23:09 +0000
committerRĂ¼diger Herrmann2011-01-28 14:23:09 +0000
commit3e42eafec21e964084dfd20f9ae70345d2ba1c4a (patch)
tree42908db898f6a94df2f81951c2f057aa9f63d6fb /bundles
parent4d90552d48700171b6c59901258b13d92191cd95 (diff)
downloadorg.eclipse.rap-3e42eafec21e964084dfd20f9ae70345d2ba1c4a.tar.gz
org.eclipse.rap-3e42eafec21e964084dfd20f9ae70345d2ba1c4a.tar.xz
org.eclipse.rap-3e42eafec21e964084dfd20f9ae70345d2ba1c4a.zip
Reduced visibility of methods where suitable
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.rap.rwt.q07/src/org/eclipse/swt/internal/widgets/tablekit/TableLCA.java16
-rw-r--r--bundles/org.eclipse.rap.rwt.q07/src/org/eclipse/swt/internal/widgets/treekit/TreeLCA.java34
2 files changed, 27 insertions, 23 deletions
diff --git a/bundles/org.eclipse.rap.rwt.q07/src/org/eclipse/swt/internal/widgets/tablekit/TableLCA.java b/bundles/org.eclipse.rap.rwt.q07/src/org/eclipse/swt/internal/widgets/tablekit/TableLCA.java
index f4ee8040be..9a4cba0be7 100644
--- a/bundles/org.eclipse.rap.rwt.q07/src/org/eclipse/swt/internal/widgets/tablekit/TableLCA.java
+++ b/bundles/org.eclipse.rap.rwt.q07/src/org/eclipse/swt/internal/widgets/tablekit/TableLCA.java
@@ -401,7 +401,9 @@ public final class TableLCA extends AbstractWidgetLCA {
writer.set( prop, "defaultColumnWidth", newValue, defValue );
}
- private void writeAlwaysHideSelection( final Table table ) throws IOException {
+ private static void writeAlwaysHideSelection( final Table table )
+ throws IOException
+ {
JSWriter writer = JSWriter.getWriterFor( table );
Boolean newValue = alwaysHideSelection( table );
Boolean defValue = Boolean.FALSE;
@@ -409,7 +411,9 @@ public final class TableLCA extends AbstractWidgetLCA {
writer.set( prop, "alwaysHideSelection", newValue, defValue );
}
- private void writeScrollBarsVisible( final Table table ) throws IOException {
+ private static void writeScrollBarsVisible( final Table table )
+ throws IOException
+ {
boolean hasHChanged = WidgetLCAUtil.hasChanged( table,
PROP_HAS_H_SCROLL_BAR,
hasHScrollBar( table ),
@@ -428,7 +432,7 @@ public final class TableLCA extends AbstractWidgetLCA {
}
}
- private void writeLeftOffset( final Table table ) throws IOException {
+ private static void writeLeftOffset( final Table table ) throws IOException {
JSWriter writer = JSWriter.getWriterFor( table );
Integer newValue = getLeftOffset( table );
writer.set( PROP_LEFT_OFFSET, "leftOffset", newValue, DEFAULT_LEFT_OFFSET );
@@ -510,19 +514,19 @@ public final class TableLCA extends AbstractWidgetLCA {
//////////////////
// Helping methods
- private Boolean hasHScrollBar( final Table table ) {
+ private static Boolean hasHScrollBar( final Table table ) {
Object adapter = table.getAdapter( ITableAdapter.class );
ITableAdapter tableAdapter = ( ITableAdapter )adapter;
return Boolean.valueOf( tableAdapter.hasHScrollBar() );
}
- private Boolean hasVScrollBar( final Table table ) {
+ private static Boolean hasVScrollBar( final Table table ) {
Object adapter = table.getAdapter( ITableAdapter.class );
ITableAdapter tableAdapter = ( ITableAdapter )adapter;
return Boolean.valueOf( tableAdapter.hasVScrollBar() );
}
- private Integer getLeftOffset( final Table table ) {
+ private static Integer getLeftOffset( final Table table ) {
Object adapter = table.getAdapter( ITableAdapter.class );
ITableAdapter tableAdapter = ( ITableAdapter )adapter;
return new Integer( tableAdapter.getLeftOffset() );
diff --git a/bundles/org.eclipse.rap.rwt.q07/src/org/eclipse/swt/internal/widgets/treekit/TreeLCA.java b/bundles/org.eclipse.rap.rwt.q07/src/org/eclipse/swt/internal/widgets/treekit/TreeLCA.java
index 8f9b7d63c6..5678246ddf 100644
--- a/bundles/org.eclipse.rap.rwt.q07/src/org/eclipse/swt/internal/widgets/treekit/TreeLCA.java
+++ b/bundles/org.eclipse.rap.rwt.q07/src/org/eclipse/swt/internal/widgets/treekit/TreeLCA.java
@@ -45,7 +45,7 @@ public final class TreeLCA extends AbstractWidgetLCA {
static final String PROP_ENABLE_CELL_TOOLTIP
= "enableCellToolTip";
- private static final Integer DEFAULT_SCROLL_LEFT = new Integer( 0 );
+ private static final Integer ZERO = new Integer( 0 );
public void preserveValues( final Widget widget ) {
Tree tree = ( Tree )widget;
@@ -64,7 +64,8 @@ public final class TreeLCA extends AbstractWidgetLCA {
adapter.preserve( PROP_TREE_COLUMN, getTreeColumn( tree ) );
adapter.preserve( PROP_ITEM_HEIGHT, new Integer( tree.getItemHeight() ) );
adapter.preserve( PROP_SCROLL_LEFT, getScrollLeft( tree ) );
- adapter.preserve( PROP_TOP_ITEM_INDEX, new Integer( getTopItemIndex( tree ) ) );
+ adapter.preserve( PROP_TOP_ITEM_INDEX,
+ new Integer( getTopItemIndex( tree ) ) );
adapter.preserve( PROP_HAS_H_SCROLL_BAR, hasHScrollBar( tree ) );
adapter.preserve( PROP_HAS_V_SCROLL_BAR, hasVScrollBar( tree ) );
adapter.preserve( PROP_SCROLLBARS_SELECTION_LISTENER,
@@ -257,9 +258,7 @@ public final class TreeLCA extends AbstractWidgetLCA {
}
}
- public static void writeItemMetrics( final Tree tree )
- throws IOException
- {
+ static void writeItemMetrics( final Tree tree ) throws IOException {
ItemMetrics[] itemMetrics = getItemMetrics( tree );
if( hasItemMetricsChanged( tree, itemMetrics ) ) {
JSWriter writer = JSWriter.getWriterFor( tree );
@@ -277,8 +276,9 @@ public final class TreeLCA extends AbstractWidgetLCA {
}
}
}
- public static void writeIndentionWidth( final Tree tree )
- throws IOException
+
+ private static void writeIndentionWidth( final Tree tree )
+ throws IOException
{
JSWriter writer = JSWriter.getWriterFor( tree );
ITreeAdapter treeAdapter = getTreeAdapter( tree );
@@ -291,27 +291,27 @@ public final class TreeLCA extends AbstractWidgetLCA {
writer.set( PROP_HEADER_HEIGHT, "headerHeight", newValue, null );
}
- private void writeColumnCount( final Tree tree ) throws IOException {
+ private static void writeColumnCount( final Tree tree ) throws IOException {
JSWriter writer = JSWriter.getWriterFor( tree );
Integer newValue = new Integer( tree.getColumnCount() );
if( WidgetLCAUtil.hasChanged( tree, PROP_COLUMN_COUNT, newValue ) ) {
- writer.set( PROP_COLUMN_COUNT, "columnCount", newValue, new Integer( 0 ) );
+ writer.set( PROP_COLUMN_COUNT, "columnCount", newValue, ZERO );
}
}
- private void writeTreeColumn( final Tree tree ) throws IOException {
+ private static void writeTreeColumn( final Tree tree ) throws IOException {
JSWriter writer = JSWriter.getWriterFor( tree );
Integer newValue = getTreeColumn( tree );
if( WidgetLCAUtil.hasChanged( tree, PROP_TREE_COLUMN, newValue ) ) {
- writer.set( PROP_TREE_COLUMN, "treeColumn", newValue, new Integer( 0 ) );
+ writer.set( PROP_TREE_COLUMN, "treeColumn", newValue, ZERO );
}
}
- private void writeTopItem( final Tree tree ) throws IOException {
+ private static void writeTopItem( final Tree tree ) throws IOException {
JSWriter writer = JSWriter.getWriterFor( tree );
Integer newValue = new Integer( getTopItemIndex( tree ) );
if( WidgetLCAUtil.hasChanged( tree, PROP_TOP_ITEM_INDEX, newValue ) ) {
- writer.set( PROP_TOP_ITEM_INDEX, "topItemIndex", newValue, new Integer( 0 ) );
+ writer.set( PROP_TOP_ITEM_INDEX, "topItemIndex", newValue, ZERO );
}
}
@@ -321,10 +321,10 @@ public final class TreeLCA extends AbstractWidgetLCA {
writer.set( PROP_HEADER_VISIBLE, "headerVisible", newValue, Boolean.FALSE );
}
- private void writeScrollLeft( final Tree tree ) throws IOException {
+ private static void writeScrollLeft( final Tree tree ) throws IOException {
JSWriter writer = JSWriter.getWriterFor( tree );
Integer newValue = getScrollLeft( tree );
- writer.set( PROP_SCROLL_LEFT, "scrollLeft", newValue, DEFAULT_SCROLL_LEFT );
+ writer.set( PROP_SCROLL_LEFT, "scrollLeft", newValue, ZERO );
}
private static void writeScrollBars( final Tree tree ) throws IOException {
@@ -545,7 +545,7 @@ public final class TreeLCA extends AbstractWidgetLCA {
}
- public static ItemMetrics[] getItemMetrics( final Tree tree ) {
+ static ItemMetrics[] getItemMetrics( final Tree tree ) {
int columnCount = Math.max( 1, tree.getColumnCount() );
ItemMetrics[] result = new ItemMetrics[ columnCount ];
for( int i = 0; i < columnCount; i++ ) {
@@ -563,7 +563,7 @@ public final class TreeLCA extends AbstractWidgetLCA {
return result;
}
- public static void preserveItemMetrics( final Tree tree ) {
+ private static void preserveItemMetrics( final Tree tree ) {
IWidgetAdapter adapter = WidgetUtil.getAdapter( tree );
adapter.preserve( PROP_ITEM_METRICS, getItemMetrics( tree ) );
}

Back to the top