public static Color TAB_HOVER_FONT_COLOR = getColor("tab_hover_font_color"); //$NON-NLS-1$\r
public static Color TAB_PUSH_FONT_COLOR = getColor("tab_push_font_color"); //$NON-NLS-1$\r
\r
+ public static Color TAB_BG_COLOR = getColor("tab_bg_color"); //$NON-NLS-1$\r
public static Color TAB_BG_COLOR_START = getColor("tab_bg_color_start"); //$NON-NLS-1$\r
public static Color TAB_BG_COLOR_END = getColor("tab_bg_color_end"); //$NON-NLS-1$\r
public static Color TAB_BG_OUTLINE_COLOR = getColor("tab_bg_outline_color"); //$NON-NLS-1$\r
public static final Font TAB_BUTTON_FONT = getFont(\r
"tab_button_font", resizeDefaultFont(8, 3));//$NON-NLS-1$\r
// mac 11\r
-\r
+ \r
+ public static final Font TAB_BUTTON_LARGE_FONT = getFont(\r
+ "tab_button_large_font", resizeDefaultFont(9, 2));//$NON-NLS-1$\r
+ \r
// * Time-Line Layout\r
// Edit Chart Dlg.\r
public static final Font ADDITEM_BUTTON_FONT = getFont(\r
\r
// Tab\r
public static final Image TAB = getPngImage("tab_unselected"); //$NON-NLS-1$\r
+ public static final Image TAB_NORMAL = getPngImage("tab_normal"); //$NON-NLS-1$\r
public static final Image TAB_PUSH = getPngImage("tab_push"); //$NON-NLS-1$\r
public static final Image TAB_HOVER = getPngImage("tab_hover"); //$NON-NLS-1$\r
- public static final Image TAB_DISABLE = getPngImage("tab_selected"); //$NON-NLS-1$\r
+ public static final Image TAB_SELECTED = getPngImage("tab_selected"); //$NON-NLS-1$\r
+ public static final Image TAB_DRAG = getPngImage("tab_dag"); //$NON-NLS-1$\r
\r
// Trim\r
public static final Image WINDOW_TOP = getPngImage("window_top_pattern_01"); //$NON-NLS-1$\r
setColor("open_trace_table2_font_color", new RGB(255, 85, 57)); //$NON-NLS-1$
/** tab widget colors **/
- setColor("tab_selected_color_start", new RGB(255, 255, 255));
- setColor("tab_selected_color_end", new RGB(178, 178, 178));
- setColor("tab_normal_color_start", new RGB(206, 206, 206));
- setColor("tab_normal_color_end", new RGB(163, 163, 163));
- setColor("tab_hover_color_start", new RGB(206, 206, 206));
- setColor("tab_hover_color_end", new RGB(163, 163, 163));
- setColor("tab_push_color_start", new RGB(163, 163, 163));
- setColor("tab_push_color_end", new RGB(206, 206, 206));
-
- setColor("tab_outline_normal_color", new RGB(115, 115, 115));
- setColor("tab_outline_push_color", new RGB(10, 113, 178));
- setColor("tab_outline_hover_color", new RGB(10, 113, 178));
- setColor("tab_outline_selected_color", new RGB(160, 160, 160));
+ setColor("tab_selected_color_start", new RGB(148, 194, 201));
+ setColor("tab_selected_color_end", new RGB(88, 167, 179));
+ setColor("tab_normal_color_start", new RGB(39, 81, 89));
+ setColor("tab_normal_color_end", new RGB(15, 45, 50));
+ setColor("tab_hover_color_start", new RGB(39, 81, 89));
+ setColor("tab_hover_color_end", new RGB(15, 45, 50));
+ setColor("tab_push_color_start", new RGB(15, 45, 50));
+ setColor("tab_push_color_end", new RGB(39, 81, 89));
+
+ setColor("tab_outline_normal_color", new RGB(0, 0, 0));
+ setColor("tab_outline_push_color", new RGB(106, 154, 163));
+ setColor("tab_outline_hover_color", new RGB(106, 154, 163));
+ setColor("tab_outline_selected_color", new RGB(232, 234, 235));
setColor("tab_selected_font_color", new RGB(0, 0, 0));
- setColor("tab_normal_font_color", new RGB(91, 91, 91));
- setColor("tab_hover_font_color", new RGB(91, 91, 91));
- setColor("tab_push_font_color", new RGB(91, 91, 91));
+ setColor("tab_normal_font_color", new RGB(184, 184, 184));
+ setColor("tab_hover_font_color", new RGB(184, 184, 184));
+ setColor("tab_push_font_color", new RGB(184, 184, 184));
+ setColor("tab_bg_color", new RGB(47, 85, 92));
setColor("tab_bg_color_start", new RGB(205, 205, 205));
setColor("tab_bg_color_end", new RGB(216, 216, 216));
setColor("tab_bg_outline_color", new RGB(160, 160, 160));
private Rectangle closeButtonRect = null;
private DACustomButtonClickEventListener closeButtonListener = null;
- public DATabButton(Composite parent, int style) {
+ public DATabButton(Composite parent, int style, boolean isImageTab) {
super(parent, ColorResources.TAB_NORMAL_COLOR_START,
ColorResources.TAB_NORMAL_COLOR_END,
ColorResources.TAB_PUSH_COLOR_START,
ColorResources.TAB_HOVER_COLOR_END,
ColorResources.TAB_SELECTED_COLOR_START,
ColorResources.TAB_SELECTED_COLOR_END);
- this.setLayout(new FormLayout());
+ if(isImageTab) {
+ this.setImages(ImageResources.TAB_NORMAL,
+ ImageResources.TAB_PUSH,
+ ImageResources.TAB_HOVER,
+ ImageResources.TAB_SELECTED);
+ }
this.addListener(SWT.MouseMove, tbMouseEventListener);
this.addListener(SWT.MouseDown, tbMouseEventListener);
if (null == closeButtonRect) {
Rectangle imgRect = button.getCloseButtonImage().getBounds();
Rectangle rect = button.getBounds();
- closeButtonRect = new Rectangle(rect.width - imgRect.width - 2,
- (rect.height - imgRect.height) / 2, imgRect.width,
+ closeButtonRect = new Rectangle(rect.width - imgRect.width - 6,
+ rect.y + 1, imgRect.width,
imgRect.height);
}
private int targetButtonIndex = -1;
private int sourceButtonIndex = -1;
private boolean drag = false;
-
+
+ private boolean isImageTab = false;
private int tabWidth = LONG_TAB_WIDTH;
{
public void paintControl(PaintEvent e) {
Composite comp = (Composite) e.widget;
Rectangle rect = comp.getClientArea();
- e.gc.setForeground(ColorResources.TAB_BG_COLOR_START);
- e.gc.setBackground(ColorResources.TAB_BG_COLOR_END);
+ e.gc.setBackground(ColorResources.TAB_BG_COLOR);
e.gc.fillGradientRectangle(rect.x, rect.y, rect.width, rect.height,
true);
- e.gc.setForeground(ColorResources.TAB_BG_OUTLINE_COLOR);
e.gc.drawRectangle(rect);
}
};
String title = child.getTitle();
- final DATabButton tabButton = new DATabButton(tabComposite, SWT.NONE);
+ final DATabButton tabButton;
+ if(isImageTab) {
+ tabButton = new DATabButton(tabComposite, SWT.NONE, true);
+ tabButton.setButtonFont(FontResources.TAB_BUTTON_FONT);
+ } else {
+ tabButton = new DATabButton(tabComposite, SWT.NONE, false);
+ tabButton.setButtonFont(FontResources.TAB_BUTTON_LARGE_FONT);
+ }
tabButton.setFontColors(ColorResources.TAB_NORMAL_FONT_COLOR,
ColorResources.TAB_PUSH_FONT_COLOR,
ColorResources.TAB_HOVER_FONT_COLOR,
ColorResources.TAB_OUTLINE_SELECTED_COLOR);
tabButton.setRenderer(new TabButtonRenderer());
tabButton.setButtonEnabled(true);
- tabButton.setButtonFont(FontResources.TAB_BUTTON_FONT);
+ tabButton.setBackground(ColorResources.TAB_BG_COLOR);
tabButton.setText(title);
tabButton.setToolTipText((String) child.getData("tooltip"));
tabButton.setClosable(closeable);
FormData data = new FormData();
- data.top = new FormAttachment(0, 0);
+ data.top = new FormAttachment(0, 1);
data.bottom = new FormAttachment(100, 0);
-
+
if (buttons.size() > 0) {
DATabButton lastbutton = buttons.get(buttons.size() - 1);
data.left = new FormAttachment(lastbutton, 0);
contentsComposite.layout();
} else {
if (r.contains(curPosition.x, 0)
- && (event.y > r.y && event.y < r.y
+ && (event.y > r.y && event.y < r.y
+ r.height)) {
btn.changeButtonState(DACustomButton.STATE_HOVER);
} else {
// positioning of the tab button
private void setLayoutTabs(int leftTabIndex, int tabIndex) {
FormData data = new FormData();
- data.top = new FormAttachment(0, 0);
+ data.top = new FormAttachment(0, 1);
data.bottom = new FormAttachment(100, 0);
data.width = tabWidth;
if (leftTabIndex != -1) {
public void setTabWidth(int size) {
tabWidth = size;
}
+
+ public void isImageTab(boolean isImageTab) {
+ this.isImageTab = isImageTab;
+ }
@Override
public DABaseComposite getView(String ID) {
if (button.isClosable()) {
Image img = button.getCloseButtonImage();
Rectangle imgRect = img.getBounds();
- gc.drawImage(img, rect.width - imgRect.width, rect.y + 1);
+ gc.drawImage(img, rect.width - imgRect.width - 6, rect.y + 1);
}
}
"additem_button_font", resizeSystemFont(8));//$NON-NLS-1$\r
public static final Font TAB_BUTTON_FONT = getFont(\r
"tab_button_font", resizeSystemFont(10));//$NON-NLS-1$\r
+ public static final Font TAB_BUTTON__LARGE_FONT = getFont(\r
+ "tab_button_large_font", resizeSystemFont(10));//$NON-NLS-1$\r
\r
public static final Font CURRENT_TABLE_HEADER_FONT = getFont(\r
"current_table_header_font", resizeSystemFont(8));//$NON-NLS-1$\r
// create tab view in base composite
tabView = new DATabComposite(parent, SWT.DOUBLE_BUFFERED);
- tabView.setTabWidth(110);
+ tabView.setTabWidth(114);
+ tabView.isImageTab(true);
{
DABaseComposite timelinePage = new TimelinePage(
tabView.getContentComposite(), SWT.NONE);