Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Commit

Permalink
Merge pull request #4 from Dynatrace/ui-tweaks
Browse files Browse the repository at this point in the history
Label width tweaks for Linux
  • Loading branch information
dglugla committed Feb 3, 2017
2 parents 4627c41 + 3c4f4c5 commit e679553
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 20 deletions.
8 changes: 4 additions & 4 deletions com.dynatrace.eclipseintegration.plugin/plugin.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ preferences_global_test_timeout = Test result timeout (s):
preferences_global_test_category = Test category:
preferences_global_test_category_unit = unit
preferences_global_test_category_performance = performance
preferences_global_server_via_ssl_label = Connect using SSL
preferences_global_server_via_ssl_label = Connect using SSL:

preferences_global_agentGroup = Agent
preferences_global_agentLibraryLabel = Agent library:
Expand All @@ -29,9 +29,9 @@ preferences_global_agentLibraryBrowseLabel = Browse
preferences_global_CodeLinkGroup = CodeLink
preferences_global_client_host = Client host:
preferences_global_client_port = Client port:
preferences_global_client_via_ssl_label = Connect using SSL
preferences_global_enable_code_link = Enable CodeLink
preferences_global_switch_to_Java_Browsing_Perspective = Switch to Java B rowsing Perspective
preferences_global_client_via_ssl_label = Connect using SSL:
preferences_global_enable_code_link = Enable CodeLink:
preferences_global_switch_to_Java_Browsing_Perspective = Switch to Java Browsing Perspective:

preferences_global_link_help = <a>Help and Troubleshooting</a>
preferences_global_link_help_url = https://community.dynatrace.com/community/display/DL/Dynatrace+Eclipse+Integration+Plugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ private StringResources() {
public static String preferences_global_CodeLinkGroup;
public static String preferences_global_client_host;
public static String preferences_global_client_port;
public static String preferences_global_client_via_ssl_label;
public static String preferences_global_enable_code_link;
public static String preferences_global_switch_to_Java_Browsing_Perspective;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
Expand All @@ -15,7 +16,6 @@
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Link;
import org.eclipse.swt.widgets.Text;
import org.eclipse.wb.swt.ResourceManager;
import org.eclipse.wb.swt.SWTResourceManager;

import com.dynatrace.diagnostics.eclipseintegration.Activator;
Expand All @@ -28,8 +28,6 @@

class DesignerGenerated extends Composite {

private static final int LONGEST_LABEL_WIDTH_PX = 118;

final Label companyLogoImg;
final Text serverText;
final Text collectorAgentConnectionPortText;
Expand Down Expand Up @@ -117,7 +115,6 @@ class DesignerGenerated extends Composite {

Label lblServer = new Label(grpServer, SWT.RIGHT);
GridData gd_lblServer = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);
gd_lblServer.widthHint = LONGEST_LABEL_WIDTH_PX;
lblServer.setLayoutData(gd_lblServer);
lblServer.setText(StringResources.preferences_global_server_label);

Expand All @@ -126,7 +123,6 @@ class DesignerGenerated extends Composite {

Label lblServerRESTPort = new Label(grpServer, SWT.RIGHT);
GridData gd_lblServerRESTPort = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);
gd_lblServerRESTPort.widthHint = LONGEST_LABEL_WIDTH_PX;
lblServerRESTPort.setLayoutData(gd_lblServerRESTPort);
lblServerRESTPort.setText(StringResources.preferences_global_server_REST_port_label);
serverRESTPortText = new Text(grpServer, SWT.BORDER);
Expand All @@ -144,7 +140,6 @@ public void widgetSelected(SelectionEvent e) {

Label lblLogin = new Label(grpServer, SWT.RIGHT);
GridData gd_lblLogin = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);
gd_lblLogin.widthHint = LONGEST_LABEL_WIDTH_PX;
lblLogin.setLayoutData(gd_lblLogin);
lblLogin.setText(StringResources.preferences_global_login_label);

Expand All @@ -153,7 +148,6 @@ public void widgetSelected(SelectionEvent e) {

Label lblPassword = new Label(grpServer, SWT.RIGHT);
GridData gd_lblPassword = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);
gd_lblPassword.widthHint = LONGEST_LABEL_WIDTH_PX;
gd_lblPassword.minimumWidth = 148;
lblPassword.setLayoutData(gd_lblPassword);
lblPassword.setText(StringResources.preferences_global_password_label);
Expand All @@ -163,7 +157,6 @@ public void widgetSelected(SelectionEvent e) {

Label lblRetrievalTimeout = new Label(grpServer, SWT.RIGHT);
GridData gd_lblRetrievalTimeout = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);
gd_lblRetrievalTimeout.widthHint = LONGEST_LABEL_WIDTH_PX;
gd_lblRetrievalTimeout.minimumWidth = 148;
lblRetrievalTimeout.setLayoutData(gd_lblRetrievalTimeout);
lblRetrievalTimeout.setText(StringResources.preferences_global_test_timeout);
Expand All @@ -173,7 +166,6 @@ public void widgetSelected(SelectionEvent e) {

Label lblTestCategory = new Label(grpServer, SWT.RIGHT);
GridData gd_lblTestCategory = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);
gd_lblTestCategory.widthHint = LONGEST_LABEL_WIDTH_PX;
gd_lblTestCategory.minimumWidth = 148;
lblTestCategory.setLayoutData(gd_lblTestCategory);
lblTestCategory.setText(StringResources.preferences_global_test_category);
Expand All @@ -192,7 +184,6 @@ public void widgetSelected(SelectionEvent e) {

Label lblNewLabel = new Label(grpClient, SWT.RIGHT);
GridData gd_lblNewLabel = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);
gd_lblNewLabel.widthHint = LONGEST_LABEL_WIDTH_PX;
gd_lblNewLabel.minimumWidth = 148;
lblNewLabel.setLayoutData(gd_lblNewLabel);
lblNewLabel.setBounds(0, 0, 55, 15);
Expand All @@ -205,15 +196,13 @@ public void widgetSelected(SelectionEvent e) {

Label lblCollectorServerHost = new Label(grpClient, SWT.RIGHT);
GridData gd_lblCollectorServerHost = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);
gd_lblCollectorServerHost.widthHint = LONGEST_LABEL_WIDTH_PX;
lblCollectorServerHost.setLayoutData(gd_lblCollectorServerHost);
lblCollectorServerHost.setText(StringResources.preferences_global_collector_host_label);
collectorHost = new Text(grpClient, SWT.BORDER);
collectorHost.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));

Label lblCollectorServerPort = new Label(grpClient, SWT.RIGHT);
GridData gd_lblCollectorServerPort = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);
gd_lblCollectorServerPort.widthHint = LONGEST_LABEL_WIDTH_PX;
lblCollectorServerPort.setLayoutData(gd_lblCollectorServerPort);
lblCollectorServerPort.setText(StringResources.preferences_global_collector_agent_port_label);
collectorAgentConnectionPortText = new Text(grpClient, SWT.BORDER);
Expand Down Expand Up @@ -251,7 +240,6 @@ public void widgetSelected(SelectionEvent e) {

Label lblClientRestPort = new Label(grpCodelink, SWT.RIGHT);
GridData gd_lblClientRestPort = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);
gd_lblClientRestPort.widthHint = LONGEST_LABEL_WIDTH_PX;
lblClientRestPort.setLayoutData(gd_lblClientRestPort);
lblClientRestPort.setText(StringResources.preferences_global_client_port);

Expand All @@ -264,17 +252,31 @@ public void widgetSelected(SelectionEvent e) {
Label lblClientConnectSSL = new Label(grpCodelink, SWT.NONE);
lblClientConnectSSL.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
lblClientConnectSSL.setAlignment(SWT.RIGHT);
lblClientConnectSSL.setText("Connect using SSL");
lblClientConnectSSL.setText(StringResources.preferences_global_client_via_ssl_label);

clientViaSSLCheck = new Button(grpCodelink, SWT.CHECK);

Label lblUseJavaBrowsing = new Label(grpCodelink, SWT.WRAP);
lblUseJavaBrowsing.setAlignment(SWT.RIGHT);
GridData layoutData = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);
layoutData.widthHint = LONGEST_LABEL_WIDTH_PX;
lblUseJavaBrowsing.setLayoutData(layoutData);
lblUseJavaBrowsing.setText("Use Java Browsing Perspective");
lblUseJavaBrowsing.setText(StringResources.preferences_global_switch_to_Java_Browsing_Perspective);
switchToJavaBrowsingCheck = new Button(grpCodelink, SWT.CHECK);

GC gc = new GC(lblRetrievalTimeout);
int longestLabelWidth = gc.textExtent(StringResources.preferences_global_test_timeout).x;

gd_lblServer.widthHint = longestLabelWidth;
gd_lblServerRESTPort.widthHint = longestLabelWidth;
gd_lblLogin.widthHint = longestLabelWidth;
gd_lblPassword.widthHint = longestLabelWidth;
gd_lblRetrievalTimeout.widthHint = longestLabelWidth;
gd_lblTestCategory.widthHint = longestLabelWidth;
gd_lblNewLabel.widthHint = longestLabelWidth;
gd_lblCollectorServerHost.widthHint = longestLabelWidth;
gd_lblCollectorServerPort.widthHint = longestLabelWidth;
gd_lblClientRestPort.widthHint = longestLabelWidth;
layoutData.widthHint = longestLabelWidth;
}

@Override
Expand Down

0 comments on commit e679553

Please sign in to comment.