Add a left edge border to FlexTable instances

It looks cleaner when the table has a left and a right border.

Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
Shawn O. Pearce
2009-01-07 10:31:58 -08:00
parent 392ac7e4ed
commit 85b19e7cc5
10 changed files with 18 additions and 1 deletions

View File

@@ -90,6 +90,7 @@ class AgreementPanel extends Composite {
void addOne(final AgreementInfo info, final AccountAgreement k) {
final int row = table.getRowCount();
table.insertRow(row);
applyDataRowStyle(row);
final ContributorAgreement cla = info.agreements.get(k.getAgreementId());
final String statusName;

View File

@@ -113,6 +113,7 @@ class ExternalIdPanel extends Composite {
void addOneId(final AccountExternalId k) {
final int row = table.getRowCount();
table.insertRow(row);
applyDataRowStyle(row);
table.setText(row, 1, FormatUtil.mediumFormat(k.getLastUsedOn()));
table.setText(row, 2, k.getEmailAddress());

View File

@@ -237,6 +237,7 @@ class ProjectWatchPanel extends Composite {
}
table.insertRow(row);
applyDataRowStyle(row);
populate(row, k);
}
@@ -247,6 +248,7 @@ class ProjectWatchPanel extends Composite {
for (final AccountProjectWatchInfo k : result) {
final int row = table.getRowCount();
table.insertRow(row);
applyDataRowStyle(row);
populate(row, k);
}
}

View File

@@ -211,6 +211,7 @@ class SshKeyPanel extends Composite {
void addOneKey(final AccountSshKey k) {
final int row = table.getRowCount();
table.insertRow(row);
applyDataRowStyle(row);
table.setWidget(row, 1, new CheckBox());
table.setWidget(row, 2, k.isValid() ? Gerrit.ICONS.greenCheck()

View File

@@ -378,6 +378,7 @@ public class AccountGroupScreen extends AccountScreen {
void insertMember(final AccountGroupMember k) {
final int row = table.getRowCount();
table.insertRow(row);
applyDataRowStyle(row);
populate(row, k);
}
@@ -388,6 +389,7 @@ public class AccountGroupScreen extends AccountScreen {
for (final AccountGroupMember k : result) {
final int row = table.getRowCount();
table.insertRow(row);
applyDataRowStyle(row);
populate(row, k);
}
}

View File

@@ -136,6 +136,7 @@ public class GroupListScreen extends AccountScreen {
for (final AccountGroup k : result) {
final int row = table.getRowCount();
table.insertRow(row);
applyDataRowStyle(row);
populate(row, k);
}
}

View File

@@ -444,6 +444,7 @@ public class ProjectAdminScreen extends AccountScreen {
for (final ProjectRight k : result) {
final int row = table.getRowCount();
table.insertRow(row);
applyDataRowStyle(row);
populate(row, groups, k);
}
}

View File

@@ -103,6 +103,7 @@ public class ProjectListScreen extends AccountScreen {
for (final Project k : result) {
final int row = table.getRowCount();
table.insertRow(row);
applyDataRowStyle(row);
populate(row, k);
}
}

View File

@@ -37,12 +37,13 @@ import java.util.Map.Entry;
public abstract class FancyFlexTable<RowItem> extends Composite implements
HasFocus {
protected static final String S_ACTIVE_ROW = "ActiveRow";
protected static final String MY_STYLE = "gerrit-ChangeTable";
protected static final String S_ICON_HEADER = "IconHeader";
protected static final String S_DATA_HEADER = "DataHeader";
protected static final String S_ICON_CELL = "IconCell";
protected static final String S_DATA_CELL = "DataCell";
protected static final String S_LEFT_MOST_CELL = "LeftMostCell";
protected static final String S_ACTIVE_ROW = "ActiveRow";
protected static final int C_ARROW = 0;
@@ -194,6 +195,7 @@ public abstract class FancyFlexTable<RowItem> extends Composite implements
protected void applyDataRowStyle(final int newRow) {
table.getCellFormatter().addStyleName(newRow, C_ARROW, S_ICON_CELL);
table.getCellFormatter().addStyleName(newRow, C_ARROW, S_LEFT_MOST_CELL);
}
public void finishDisplay(final boolean requestFocus) {

View File

@@ -172,6 +172,10 @@
white-space: nowrap;
}
.gerrit-ChangeTable .LeftMostCell {
border-left: 1px solid #d4e9a9;
}
.gerrit-ChangeTable .DataCell {
padding-left: 5px;
padding-right: 5px;
@@ -221,6 +225,7 @@
}
.gerrit-ChangeTable .EmptySection {
border-left: 1px solid #d4e9a9;
border-right: 1px solid #d4e9a9;
border-bottom: 1px solid #d4e9a9;
font-style: italic;