當前位置: 首頁>>代碼示例>>Java>>正文


Java ShipGroupConfig類代碼示例

本文整理匯總了Java中logbook.config.ShipGroupConfig的典型用法代碼示例。如果您正苦於以下問題:Java ShipGroupConfig類的具體用法?Java ShipGroupConfig怎麽用?Java ShipGroupConfig使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ShipGroupConfig類屬於logbook.config包,在下文中一共展示了ShipGroupConfig類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: run

import logbook.config.ShipGroupConfig; //導入依賴的package包/類
@Override
public void run() {
    try {
        // リソースを開放する
        SWTResourceManager.dispose();

        // 設定を書き込みます
        AppConfig.store();
        ShipConfig.store();
        ShipGroupConfig.store();
        ItemMasterConfig.store();
        ItemConfig.store();
    } catch (Exception e) {
        LoggerHolder.LOG.fatal("シャットダウンスレッドで異常終了しました", e);
    }
}
 
開發者ID:sanaehirotaka,項目名稱:logbook,代碼行數:17,代碼來源:ApplicationMain.java

示例2: widgetSelected

import logbook.config.ShipGroupConfig; //導入依賴的package包/類
@Override
public void widgetSelected(SelectionEvent e) {
    if (this.dialog.property != null) {

        ShipGroupBean target = this.dialog.property.getShipGroupBean();

        MessageBox box = new MessageBox(this.dialog.shell, SWT.YES | SWT.NO
                | SWT.ICON_QUESTION);
        box.setText("グループを除去");
        box.setMessage("「" + target.getName() + "」を除去しますか?");
        if (box.open() == SWT.YES) {
            List<ShipGroupBean> shipGroupList = ShipGroupConfig.get().getGroup();
            for (int i = 0; i < shipGroupList.size(); i++) {
                if (shipGroupList.get(i) == target) {
                    shipGroupList.remove(i);
                }
            }
            this.dialog.text.setText("");
            this.dialog.property.getTreeItem().dispose();
            this.dialog.property = null;
        }
    }
}
 
開發者ID:kyuntx,項目名稱:logbookpn,代碼行數:24,代碼來源:ShipFilterGroupDialog.java

示例3: run

import logbook.config.ShipGroupConfig; //導入依賴的package包/類
@Override
public void run() {
    try {
        // リソースを開放する
        SWTResourceManager.dispose();
        // プロキシサーバーをシャットダウンする
        ProxyServer.end();

        // 設定を書き込みます
        AppConfig.store();
        ShipConfig.store();
        ShipGroupConfig.store();
        ItemMasterConfig.store();
        ItemConfig.store();
    } catch (Exception e) {
        LOG.fatal("シャットダウンスレッドで異常終了しました", e);
    }
}
 
開發者ID:kyuntx,項目名稱:logbookpn,代碼行數:19,代碼來源:ApplicationMain.java

示例4: widgetSelected

import logbook.config.ShipGroupConfig; //導入依賴的package包/類
@Override
public void widgetSelected(SelectionEvent e) {
    if (this.dialog.property != null) {

        ShipGroupBean target = this.dialog.property.getShipGroupBean();

        MessageBox box = new MessageBox(this.dialog.shell, SWT.YES | SWT.NO
                | SWT.ICON_QUESTION);
        box.setText("Confirmation");
        box.setMessage("Do you want to remove " + target.getName() + "from the group list?");
        if (box.open() == SWT.YES) {
            List<ShipGroupBean> shipGroupList = ShipGroupConfig.get().getGroup();
            for (int i = 0; i < shipGroupList.size(); i++) {
                if (shipGroupList.get(i) == target) {
                    shipGroupList.remove(i);
                }
            }
            this.dialog.text.setText("");
            this.dialog.property.getTreeItem().dispose();
            this.dialog.property = null;
        }
    }
}
 
開發者ID:silfumus,項目名稱:logbook-EN,代碼行數:24,代碼來源:ShipFilterGroupDialog.java

示例5: createContentsBefore

import logbook.config.ShipGroupConfig; //導入依賴的package包/類
/**
 * Create contents of the dialog.
 */
@Override
protected void createContentsBefore() {
    GridLayout shellLayout = new GridLayout(1, false);
    shellLayout.verticalSpacing = 1;
    shellLayout.marginWidth = 1;
    shellLayout.marginHeight = 1;
    shellLayout.marginBottom = 1;
    shellLayout.horizontalSpacing = 1;
    this.shell.setLayout(shellLayout);

    this.sashForm = new SashForm(this.shell, SWT.SMOOTH);
    this.sashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

    this.sideComposite = new Composite(this.sashForm, SWT.NONE);
    GridLayout sideLayout = new GridLayout(2, false);
    sideLayout.verticalSpacing = 1;
    sideLayout.marginWidth = 1;
    sideLayout.marginHeight = 1;
    sideLayout.marginBottom = 1;
    sideLayout.horizontalSpacing = 1;
    this.sideComposite.setLayout(sideLayout);

    Button btnAdd = new Button(this.sideComposite, SWT.NONE);
    btnAdd.addSelectionListener(new AddGroupAdapter(this));
    btnAdd.setImage(SWTResourceManager.getImage(ShipFilterGroupDialog.class, AppConstants.R_ICON_ADD));

    Button btnRemove = new Button(this.sideComposite, SWT.NONE);
    btnRemove.addSelectionListener(new RemoveGroupAdapter(this));
    btnRemove.setImage(SWTResourceManager.getImage(ShipFilterGroupDialog.class, AppConstants.R_ICON_DELETE));

    this.tree = new Tree(this.sideComposite, SWT.BORDER);
    this.tree.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
    this.tree.addSelectionListener(new TreeSelectionAdapter(this));

    this.treeItem = new TreeItem(this.tree, SWT.NONE);
    this.treeItem.setImage(SWTResourceManager.getImage(ShipFilterGroupDialog.class, AppConstants.R_ICON_STAR));
    this.treeItem.setText("グループ");

    ShipGroupListBean shipGroupList = ShipGroupConfig.get();

    for (ShipGroupBean bean : shipGroupList.getGroup()) {
        TreeItem groupItem = new TreeItem(this.treeItem, SWT.NONE);
        groupItem.setImage(SWTResourceManager
                .getImage(ShipFilterGroupDialog.class, AppConstants.R_ICON_FOLDER));
        groupItem.setText(bean.getName());
        groupItem.setData(new GroupProperty(bean, groupItem));
    }
    this.treeItem.setExpanded(true);

    this.mainComposite = new Composite(this.sashForm, SWT.NONE);
    GridLayout mainLayout = new GridLayout(3, false);
    mainLayout.verticalSpacing = 1;
    mainLayout.marginWidth = 1;
    mainLayout.marginHeight = 1;
    mainLayout.marginBottom = 1;
    mainLayout.horizontalSpacing = 1;
    this.mainComposite.setLayout(mainLayout);

    this.text = new Text(this.mainComposite, SWT.BORDER);
    this.text.addModifyListener(new ModifyNameAdapter(this));
    this.text.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1));
    this.text.setEnabled(false);
}
 
開發者ID:kyuntx,項目名稱:logbookpn,代碼行數:67,代碼來源:ShipFilterGroupDialog.java

示例6: createContentsBefore

import logbook.config.ShipGroupConfig; //導入依賴的package包/類
/**
 * Create contents of the dialog.
 */
@Override
protected void createContentsBefore() {
    GridLayout shellLayout = new GridLayout(1, false);
    shellLayout.verticalSpacing = 1;
    shellLayout.marginWidth = 1;
    shellLayout.marginHeight = 1;
    shellLayout.marginBottom = 1;
    shellLayout.horizontalSpacing = 1;
    this.shell.setLayout(shellLayout);

    this.sashForm = new SashForm(this.shell, SWT.SMOOTH);
    this.sashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

    this.sideComposite = new Composite(this.sashForm, SWT.NONE);
    GridLayout sideLayout = new GridLayout(2, false);
    sideLayout.verticalSpacing = 1;
    sideLayout.marginWidth = 1;
    sideLayout.marginHeight = 1;
    sideLayout.marginBottom = 1;
    sideLayout.horizontalSpacing = 1;
    this.sideComposite.setLayout(sideLayout);

    Button btnAdd = new Button(this.sideComposite, SWT.NONE);
    btnAdd.addSelectionListener(new AddGroupAdapter(this));
    btnAdd.setImage(SWTResourceManager.getImage(ShipFilterGroupDialog.class, AppConstants.R_ICON_ADD));

    Button btnRemove = new Button(this.sideComposite, SWT.NONE);
    btnRemove.addSelectionListener(new RemoveGroupAdapter(this));
    btnRemove.setImage(SWTResourceManager.getImage(ShipFilterGroupDialog.class, AppConstants.R_ICON_DELETE));

    this.tree = new Tree(this.sideComposite, SWT.BORDER);
    this.tree.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
    this.tree.addSelectionListener(new TreeSelectionAdapter(this));

    this.treeItem = new TreeItem(this.tree, SWT.NONE);
    this.treeItem.setImage(SWTResourceManager.getImage(ShipFilterGroupDialog.class, AppConstants.R_ICON_STAR));
    this.treeItem.setText("Group");

    ShipGroupListBean shipGroupList = ShipGroupConfig.get();

    for (ShipGroupBean bean : shipGroupList.getGroup()) {
        TreeItem groupItem = new TreeItem(this.treeItem, SWT.NONE);
        groupItem.setImage(SWTResourceManager
                .getImage(ShipFilterGroupDialog.class, AppConstants.R_ICON_FOLDER));
        groupItem.setText(bean.getName());
        groupItem.setData(new GroupProperty(bean, groupItem));
    }
    this.treeItem.setExpanded(true);

    this.mainComposite = new Composite(this.sashForm, SWT.NONE);
    GridLayout mainLayout = new GridLayout(3, false);
    mainLayout.verticalSpacing = 1;
    mainLayout.marginWidth = 1;
    mainLayout.marginHeight = 1;
    mainLayout.marginBottom = 1;
    mainLayout.horizontalSpacing = 1;
    this.mainComposite.setLayout(mainLayout);

    this.text = new Text(this.mainComposite, SWT.BORDER);
    this.text.addModifyListener(new ModifyNameAdapter(this));
    this.text.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1));
    this.text.setEnabled(false);
}
 
開發者ID:silfumus,項目名稱:logbook-EN,代碼行數:67,代碼來源:ShipFilterGroupDialog.java


注:本文中的logbook.config.ShipGroupConfig類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。