package com.axis.innovators.box.events;

import com.axis.innovators.box.gui.MainWindow;

import java.awt.*;

/**
 * 分类栏的渲染事件
 * @author tzdwindows 7
 */
public class CategoryRenderingEvent {
    private final MainWindow.CustomTabbedPaneUI ui;
    private final Graphics graphics;
    private final int tabPlacement;
    private final int tabIndex;
    private final int x;
    private final int y;
    private final int width;
    private final int height;
    private final boolean isSelected;
    private boolean isEnd = false;

    public CategoryRenderingEvent(MainWindow.CustomTabbedPaneUI ui, Graphics graphics, int tabPlacement, int tabIndex, int x, int y, int width, int height, boolean isSelected) {
        this.ui = ui;
        this.graphics = graphics;
        this.tabPlacement = tabPlacement;
        this.tabIndex = tabIndex;
        this.x = x;
        this.y = y;
        this.width = width;
        this.height = height;
        this.isSelected = isSelected;
    }

    public MainWindow.CustomTabbedPaneUI getUi() {
        return ui;
    }

    public Graphics getGraphics() {
        return graphics;
    }

    public int getTabPlacement() {
        return tabPlacement;
    }

    public int getTabIndex() {
        return tabIndex;
    }

    public int getX() {
        return x;
    }

    public int getY() {
        return y;
    }

    public int getWidth() {
        return width;
    }

    public int getHeight() {
        return height;
    }

    public boolean isSelected() {
        return isSelected;
    }

    public boolean isEnd() {
        return isEnd;
    }

    public void setEnd(boolean end) {
        isEnd = end;
    }

    public static class paintTabBorder {
        private final MainWindow.CustomTabbedPaneUI event;
        private final Graphics graphics;
        private final int tabPlacement;
        private final int tabIndex;
        private final int x;
        private final int y;
        private final int width;
        private final int height;
        private final boolean isSelected;

        public paintTabBorder(MainWindow.CustomTabbedPaneUI event, Graphics graphics, int tabPlacement, int tabIndex, int x, int y, int width, int height, boolean isSelected) {
            this.event = event;
            this.graphics = graphics;
            this.tabPlacement = tabPlacement;
            this.tabIndex = tabIndex;
            this.x = x;
            this.y = y;
            this.width = width;
            this.height = height;
            this.isSelected = isSelected;
        }

        public MainWindow.CustomTabbedPaneUI getEvent() {
            return event;
        }

        public Graphics getGraphics() {
            return graphics;
        }

        public int getTabPlacement() {
            return tabPlacement;
        }

        public int getTabIndex() {
            return tabIndex;
        }

        public int getX() {
            return x;
        }

        public int getY() {
            return y;
        }

        public int getWidth() {
            return width;
        }

        public int getHeight() {
            return height;
        }

        public boolean isSelected() {
            return isSelected;
        }
    }
}
