亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? selectionmodel.java

?? SWING的界面UI包 SWING的界面UI包
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
                    //設置位置,移動20x20,防止被粘帖的組件重疊,照顧空布局情況下
                    comp.setLocation(comp.getX() + 20, comp.getY() + 20);

                    //使用適配器克隆組件
                    ComponentAdapter adapter = AdapterBus.getComponentAdapter(designer, comp);
                    Component clone = adapter.clone();
                    clone.setName(clone.getName() + "_copy");
                    //在容器中添加該組件
                    container.add(clone);
                }
                clip_board.clear();
                //重新布局
                Util.layoutContainer(container);
                //觸發事件
                fireComponentPaste();
                designer.repaint();
            }
        } else {
            //不可以粘帖,警告
            Toolkit.getDefaultToolkit().beep();
        }
    }

    private void fireComponentPaste() {
        DesignerEvent evt = new DesignerEvent(this);
        evt.setPastedComponents(clip_board);
        designer.getEditListenerTable().fireComponentPasted(evt);
    }

    /**
     * 當前所選中的組件容器是否可以粘帖剪貼版內的組件
     */
    public boolean isPasteable() {
        if (selection.size() != 1) {
            //必須只有一個容器組件
            return false;
        }

        Component comp = selection.get(0);

        ComponentAdapter adapter = AdapterBus.getComponentAdapter(designer, comp);

        //并且該唯一的組件是個容器
        return adapter instanceof ContainerAdapter;
    }

    //向左對齊
    public void adjustLeftAlignment() {
        if (isBoundsAdjustable()) {
            Component comp = selection.get(0);
            int x = comp.getX();

            for (Component current : selection) {
                current.setLocation(x, current.getY());
            }
        }
    }

    //向右對齊
    public void adjustRightAlignment() {
        if (isBoundsAdjustable()) {
            Component comp = selection.get(0);
            int right_x = comp.getX() + comp.getWidth();

            for (Component current : selection) {
                current.setLocation(right_x - current.getWidth(), current.getY());
            }
        }
    }

    //向中對齊
    public void adjustCenterAlignment() {
        if (isBoundsAdjustable()) {
            Component comp = selection.get(0);
            int center_x = comp.getX() + (comp.getWidth() / 2);

            for (Component current : selection) {
                current.setLocation(center_x - (current.getWidth() / 2), current.getY());
            }
        }
    }

    //向上對齊
    public void adjustTopAlignment() {
        if (isBoundsAdjustable()) {
            Component comp = selection.get(0);
            int y = comp.getY();

            for (Component current : selection) {
                current.setLocation(current.getX(), y);
            }
        }
    }

    //向下對齊
    public void adjustBottomAlignment() {
        if (isBoundsAdjustable()) {
            Component comp = selection.get(0);
            int bottom_y = comp.getY() + comp.getHeight();

            for (Component current : selection) {
                current.setLocation(current.getX(), bottom_y - current.getHeight());
            }
        }
    }

    //向中對齊
    public void adjustMiddleAlignment() {
        if (isBoundsAdjustable()) {
            Component comp = selection.get(0);
            int middle_y = comp.getY() + (comp.getHeight() / 2);

            for (Component current : selection) {
                current.setLocation(current.getX(), middle_y - (current.getHeight() / 2));
            }
        }
    }

    //同一寬度
    public void adjustSameWidth() {
        if (isBoundsAdjustable()) {
            Component comp = selection.get(0);
            int width = comp.getWidth();

            for (Component current : selection) {
                current.setSize(width, current.getHeight());
            }
        }
    }

    //同一高度
    public void adjustSameHeight() {
        if (isBoundsAdjustable()) {
            Component comp = selection.get(0);
            int height = comp.getHeight();

            for (Component current : selection) {
                current.setSize(current.getWidth(), height);
            }
        }
    }

    public void clearSelection() {
        selection.clear();
    }

    public void clearClipBoard() {
        clip_board.clear();
    }

    public void addComp2ClipBoard(Component comp) {
        clip_board.add(comp);
    }

    public void removeCompFromClipBoard(Component comp) {
        clip_board.remove(comp);
    }

    public void addComp2ClipBoard(Collection<? extends Component> comps) {
        clip_board.addAll(comps);
    }

    public boolean hasSelection() {
        return !selection.isEmpty();
    }

    public boolean isRootSelected() {
        return hasSelection() && selection.contains(designer.getRootComponent());
    }

    public boolean isClipBoardEmpty() {
        return clip_board.isEmpty();
    }

    public boolean isBoundsAdjustable() {
        return isSelectedResizable() && (selection.size() > 1);
    }

    /**
     * 刪除當前所有選擇的組件
     */
    public void deleteSelection() {
        //找出所有選中組件的根部
        ArrayList<Component> roots = getSelectedRoots();

        if (!roots.isEmpty()) {
            for (Component component : roots) {
                removeBeanFromContainer(component);
            }
            //觸發事件
            fireComponentDeleted();
            //清除被選中的組件
            clearSelection();
            designer.repaint();
        }
    }

    private void fireComponentDeleted() {
        DesignerEvent evt = new DesignerEvent(this);
        evt.setDeletedComponents(selection);
        designer.getEditListenerTable().fireComponentDeleted(evt);
    }

    public void removeComponent(Component component) {
        if (selection.contains(component)) {
            selection.remove(component);
        }

        //從頂層容器中清除這些根組件
        removeBeanFromContainer(component);
        designer.repaint();
    }

    public void setHotspotBounds(Rectangle rect) {
        hotspot_bounds = rect;
    }

    public Rectangle getHotspotBounds() {
        return hotspot_bounds;
    }

    public void setSelectedComponents(Collection<Component> components) {
        selection.clear();
        selection.addAll(components);
        fireComponentSelected();
    }

    public ArrayList<Component> getSelectedComponents() {
        return selection;
    }

    public ArrayList<Component> getClipBoard() {
        return clip_board;
    }

    private void removeBeanFromContainer(Component component) {
        Container parent = component.getParent();
        if(parent instanceof JViewport){
            parent=parent.getParent();
        }
        ComponentAdapter adapter = AdapterBus.getComponentAdapter(designer, parent);
        if (adapter instanceof ContainerAdapter) {
            ((ContainerAdapter)adapter).removeComponent(component);
        } else {
            //刪除其根組件,同時就刪除了同時被選擇的葉子組件
            parent.remove(component);
        }
        LayoutManager layout = parent.getLayout();

        if (layout != null) {
            //刷新組件容器的布局
            Util.layoutContainer(parent);
        }
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品夜夜嗨| 国产一区二区久久| 精品视频一区 二区 三区| 亚洲小说欧美激情另类| 欧美日本高清视频在线观看| 麻豆成人免费电影| 久久精品男人天堂av| 国产成人一区二区精品非洲| 欧美经典一区二区| 一本大道av一区二区在线播放| 亚洲一卡二卡三卡四卡无卡久久| 欧美绝品在线观看成人午夜影视| 久久精品二区亚洲w码| 日本一区二区三区高清不卡 | 亚洲视频免费在线观看| 色噜噜狠狠成人中文综合| 丝袜亚洲精品中文字幕一区| 久久久激情视频| 在线观看日产精品| 国产九色精品成人porny| 综合激情网...| 日韩欧美成人激情| av在线不卡网| 日本在线不卡视频一二三区| 久久久精品免费免费| 日本福利一区二区| 久久福利视频一区二区| 亚洲视频在线观看三级| 日韩欧美中文字幕一区| 色综合久久综合中文综合网| 久久超碰97中文字幕| 亚洲精品va在线观看| 26uuu色噜噜精品一区二区| 91麻豆精品秘密| 国内久久精品视频| 亚洲韩国精品一区| 中文字幕一区二区日韩精品绯色| 日韩一二三区不卡| 在线一区二区三区四区五区 | 亚洲一区二区三区四区在线| 欧美精品一区二区三区久久久| 一本久久a久久精品亚洲| 紧缚奴在线一区二区三区| 一区二区三区美女视频| 中文字幕巨乱亚洲| 久久综合一区二区| 6080亚洲精品一区二区| 91热门视频在线观看| 国产成人亚洲综合a∨猫咪| 日韩高清在线一区| 亚洲第一久久影院| 亚洲欧美一区二区久久| 中文成人综合网| 久久伊人中文字幕| 精品sm在线观看| 日韩午夜激情av| 91精品国产乱| 欧美日韩国产电影| 在线国产亚洲欧美| 日本丰满少妇一区二区三区| 波多野结衣在线aⅴ中文字幕不卡| 久久99精品久久只有精品| 亚洲成人av一区二区三区| 亚洲青青青在线视频| 中文字幕一区av| 国产精品国产三级国产aⅴ原创 | 蜜臀久久99精品久久久久宅男| 亚洲一区二区欧美日韩| 亚洲精品国产成人久久av盗摄 | 亚洲韩国精品一区| 一区二区理论电影在线观看| 一区二区在线看| 亚洲一二三区在线观看| 亚洲一区国产视频| 亚洲成人免费影院| 日韩激情视频网站| 免费在线观看视频一区| 另类欧美日韩国产在线| 久久精品国产澳门| 国产一区二区看久久| 国产成人精品三级麻豆| av在线一区二区| 色成年激情久久综合| 欧洲另类一二三四区| 在线成人高清不卡| 欧美v亚洲v综合ⅴ国产v| 精品久久久久久久久久久院品网| 精品日韩一区二区三区| wwwwww.欧美系列| 国产精品午夜在线观看| 亚洲另类色综合网站| 一区二区三区免费在线观看| 日韩和的一区二区| 狠狠狠色丁香婷婷综合激情| 粉嫩av一区二区三区粉嫩 | 欧美日韩国产综合草草| 9191久久久久久久久久久| 日韩欧美在线影院| 欧美激情综合网| 亚洲一二三四在线| 精品亚洲porn| 色综合色综合色综合色综合色综合| 欧美性感一类影片在线播放| 欧美一区永久视频免费观看| 国产情人综合久久777777| 亚洲视频 欧洲视频| 日本欧美在线观看| 成人动漫中文字幕| 8v天堂国产在线一区二区| 久久精品视频网| 亚洲国产精品久久艾草纯爱| 毛片av一区二区| 91在线精品一区二区三区| 欧美一区二区性放荡片| 国产精品久久久久婷婷| 奇米综合一区二区三区精品视频| 国产不卡视频在线播放| 欧美日韩国产高清一区二区三区 | 2024国产精品视频| 亚洲激情中文1区| 国产一区中文字幕| 在线观看91精品国产入口| 久久久久久久一区| 丝袜亚洲另类丝袜在线| 不卡在线视频中文字幕| 欧美一区二区人人喊爽| 亚洲天堂网中文字| 国产综合色在线| 欧美高清hd18日本| 亚洲区小说区图片区qvod| 韩国女主播一区| 欧美裸体bbwbbwbbw| 亚洲免费av高清| 成人国产精品免费观看| 欧美α欧美αv大片| 午夜免费欧美电影| 成人av片在线观看| 久久综合九色综合久久久精品综合| 午夜精品久久久久久久99水蜜桃 | 日本欧美加勒比视频| 99精品欧美一区二区蜜桃免费| 精品乱人伦小说| 日韩综合一区二区| 在线观看日韩高清av| 亚洲日本在线观看| 丁香天五香天堂综合| 精品国产乱码久久久久久1区2区| 五月婷婷久久丁香| 91九色02白丝porn| 亚洲精品福利视频网站| 99精品视频一区二区三区| 国产喷白浆一区二区三区| 国产原创一区二区三区| 精品少妇一区二区三区在线视频| 婷婷丁香激情综合| 欧美精选在线播放| 日一区二区三区| 欧美日韩国产片| 午夜婷婷国产麻豆精品| 欧美日韩成人一区二区| 午夜视频在线观看一区二区三区| 欧美午夜在线一二页| 精品国产网站在线观看| 久久成人综合网| 精品国产精品一区二区夜夜嗨| 日本亚洲最大的色成网站www| 欧美熟乱第一页| 日韩精品成人一区二区三区| 欧美一级日韩免费不卡| 免费成人结看片| 久久午夜电影网| 成人黄色一级视频| 亚洲欧美综合网| 在线观看不卡一区| 视频一区视频二区中文字幕| 日韩一区二区在线观看| 国产一区二区三区在线观看免费| 久久综合九色综合97婷婷女人| 国产精品自拍在线| 国产精品成人在线观看| 91福利在线看| 美女mm1313爽爽久久久蜜臀| xfplay精品久久| 91首页免费视频| 午夜精品福利视频网站| 日韩美一区二区三区| 国产精品一线二线三线精华| 日韩一区在线免费观看| 欧美性猛交xxxx黑人交| 蜜桃av噜噜一区二区三区小说| 欧美精品一区二区三区蜜桃视频| 成人av午夜影院| 日日夜夜精品视频天天综合网| 欧美不卡视频一区| 不卡的av电影| 午夜欧美大尺度福利影院在线看 | 制服丝袜中文字幕亚洲| 国产精品羞羞答答xxdd| 艳妇臀荡乳欲伦亚洲一区| 精品日韩一区二区三区 |