\r
/** setting table colors start **/\r
public static Color SETTING_TABLE_HEADER_BG = getColor("setting_table_header_bg"); //$NON-NLS-1$\r
-// public static Color SETTING_TABLE_LINE = getColor("setting_table_line"); //$NON-NLS-1$\r
-// public static Color SETTING_TABLE_CONTENTS_NORMAL = getColor("setting_table_contents_normal"); //$NON-NLS-1$\r
-// public static Color SETTING_TABLE_CONTENTS_HOVER = getColor("setting_table_contents_hover"); //$NON-NLS-1$\r
- public static Color SETTING_TABLE_CONTENTS_SELECTED_START = getColor("setting_table_contents_selected_start"); //$NON-NLS-1$\r
- public static Color SETTING_TABLE_CONTENTS_SELECTED_END = getColor("setting_table_contents_selected_end"); //$NON-NLS-1$\r
- public static Color SETTING_TABLE_CONTENTS_SELECTED_FONT_COLOR = getColor("setting_table_contents_selected_font_color"); //$NON-NLS-1$\r
+ public static Color SETTING_TABLE_CONTENTS_NORMAL_ODD = getColor("setting_table_contents_normal_odd"); //$NON-NLS-1$\r
+ public static Color SETTING_TABLE_CONTENTS_NORMAL_EVEN = getColor("setting_table_contents_normal_even"); //$NON-NLS-1$\r
+ public static Color SETTING_TABLE_CONTENTS_HOVER = getColor("setting_table_contents_hover"); //$NON-NLS-1$\r
+ public static Color SETTING_TABLE_CONTENTS_SELECTED = getColor("setting_table_contents_selected"); //$NON-NLS-1$\r
public static Color SETTING_TABLE_HEADER_FONT_COLOR = getColor("setting_table_title_font_color"); //$NON-NLS-1$\r
public static Color SETTING_TABLE_CONTENTS_FONT_COLOR = getColor("setting_table_contents_font_color"); //$NON-NLS-1$\r
-// public static Color SETTING_TABLE_CONTENTS_FAILED_BACGOUND_COLOR = getColor("setting_table_contents_failed_bacgound_color"); //$NON-NLS-1$\r
-// public static Color SETTING_TABLE_CONTENTS_FAILED_FONT_COLOR = getColor("setting_table_contents_failed_font_color"); //$NON-NLS-1$\r
/** setting table colors end **/\r
\r
\r
"time_tick", resizeDefaultFont(8, 3));//$NON-NLS-1$\r
public static final Font TIMELINE_BALLOON_FONT = getFont(\r
"time_balloon", resizeDefaultFont(8, 3));//$NON-NLS-1$\r
-\r
- // setting\r
+ \r
+ // * seting\r
public static final Font SETTING_BUTTON_FONT = getFont(\r
"setting_button_font", resizeDefaultFont(8, 3));//$NON-NLS-1$\r
\r
public static final Image TEMPLATE_NETWORK_ANALYSIS = getPngImage("feature_template_network"); //$NON-NLS-1$\r
public static final Image TEMPLATE_OPEN_GL_ANALYSIS = getPngImage("feature_template_opengl"); //$NON-NLS-1$\r
public static final Image TEMPLATE_ENERGY = getPngImage("feature_template_energy"); //$NON-NLS-1$\r
+ public static final Image TEMPLATE_CUSTOM = getPngImage("feature_template_custom"); //$NON-NLS-1$\r
\r
\r
private static Image getImage(String pluginId, String folderName,\r
/** setting table colors start **/
setColor("setting_table_header_bg", new RGB(235, 252, 254)); //$NON-NLS-1$
-// setColor("setting_table_line", new RGB(186, 186, 186)); //$NON-NLS-1$
-// setColor("setting_table_contents_normal", new RGB(255, 255, 255)); //$NON-NLS-1$
-// setColor("setting_table_contents_hover", new RGB(236, 235, 248)); //$NON-NLS-1$
- setColor("setting_table_contents_selected_start", new RGB(117, 223, 235)); //$NON-NLS-1$
- setColor("setting_table_contents_selected_end", new RGB(117, 223, 235)); //$NON-NLS-1$
+ setColor("setting_table_contents_normal_odd", new RGB(255, 255, 255)); //$NON-NLS-1$
+ setColor("setting_table_contents_normal_even", new RGB(240, 240, 240)); //$NON-NLS-1$
+ setColor("setting_table_contents_hover", new RGB(197, 231, 235)); //$NON-NLS-1$
+ setColor("setting_table_contents_selected", new RGB(117, 223, 235)); //$NON-NLS-1$
setColor("setting_table_contents_selected_font_color", new RGB(80, 80, 80)); //$NON-NLS-1$
setColor("setting_table_title_font_color", new RGB(0, 0, 0)); //$NON-NLS-1$
setColor("setting_table_contents_font_color", new RGB(80, 80, 80)); //$NON-NLS-1$
-// setColor("setting_table_contents_failed_bacgound_color", new RGB(244, 199, 197)); //$NON-NLS-1$
-// setColor("setting_table_contents_failed_font_color", new RGB(212, 75, 69)); //$NON-NLS-1$
/** setting table colors end **/
}
import org.eclipse.swt.events.PaintEvent;
import org.eclipse.swt.events.PaintListener;
import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.widgets.Composite;
public void setForeground(Color color) {
this.text.setForeground(color);
}
+
+ public void setFont(Font font) {
+ this.text.setFont(font);
+ }
}
package org.tizen.dynamicanalyzer.widgets.button.toggle;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Image;
}
}
+ protected void drawButton(GC gc, Rectangle rect, int state,
+ DACustomButtonAttribute attr) {
+ if (attr.getDrawType() == DACustomButton.TYPE_COLOR) {
+ gc.setBackground(attr.getColor(state));
+ gc.fillRectangle(rect);
+ } else {
+ int index = state * 2;
+ gc.setForeground(attr.getColor(index));
+ gc.setBackground(attr.getColor(index + 1));
+ gc.fillGradientRectangle(rect.x, rect.y, rect.width, rect.height,
+ true);
+ }
+
+ Rectangle r = new Rectangle(0, 0, rect.width - 1, rect.height - 1);
+// if (attr.getButtonImage() == null) {
+ drawButtonText(gc, r, attr, state);
+// }
+
+ // draw outline
+ Color c = gc.getForeground();
+ if (null != attr.getOutlineColor(state)) {
+ gc.setForeground(attr.getOutlineColor(state));
+ gc.drawRectangle(r);
+// } else {
+// gc.setForeground(ColorResources.BLACK);
+ }
+ Rectangle ir = new Rectangle(r.x + 1, r.y + 1, r.width - 2,
+ r.height - 2);
+ if (null != attr.getOutlineInColor(state)) {
+ gc.setForeground(attr.getOutlineInColor(state));
+ gc.drawRectangle(ir);
+// } else {
+// gc.setForeground(c);
+// return;
+ }
+ gc.setForeground(c);
+ }
+
private void drawButtonToggleImage(GC gc, Rectangle rect,
int state, DACustomButtonAttribute attr) {
Point p = null;