当前位置: 首页>>代码示例>>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;未经允许,请勿转载。