• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java WebPanel类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.alee.laf.panel.WebPanel的典型用法代码示例。如果您正苦于以下问题:Java WebPanel类的具体用法?Java WebPanel怎么用?Java WebPanel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



WebPanel类属于com.alee.laf.panel包,在下文中一共展示了WebPanel类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: init

import com.alee.laf.panel.WebPanel; //导入依赖的package包/类
private void init() {

        setLayout(new BorderLayout());

        tree = new WebTree(root);
        tree.setToggleClickCount(2);
        tree.setScrollsOnExpand(true);
        tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
        tree.setRootVisible(true);
        tree.addTreeSelectionListener(this);

        WebScrollPane treeScrollWrapper = new WebScrollPane(tree);

        WebPanel wrapper = new WebPanel(treeScrollWrapper);
        wrapper.setMargin(5, 10, 10, 0);

        MButtonPanel buttonPanel = new MButtonPanel(moveUpButton, moveDownButton,
                addButton, addSubRelationButton, removeButton)
                .withVerticalLayout()
                .withAllButtonsEnabled(true)
                .withMargin(10);

        add(wrapper, BorderLayout.CENTER);
        add(buttonPanel, BorderLayout.EAST);

    }
 
开发者ID:CLARIN-PL,项目名称:WordnetLoom,代码行数:27,代码来源:RelationTreePanel.java


示例2: initialize

import com.alee.laf.panel.WebPanel; //导入依赖的package包/类
@Override
protected void initialize(WebPanel content) {
    initilizeComponents();
    content.setLayout(new RiverLayout());

    int scrollHeight = 220;
    JScrollPane scroll = new JScrollPane(criteria);
    scroll.setMaximumSize(new Dimension(0, scrollHeight));
    scroll.setMinimumSize(new Dimension(0, scrollHeight));
    scroll.setPreferredSize(new Dimension(0, scrollHeight));
    scroll.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);

    content.add("hfill", scroll);
    content.add("br center", btnSearch);
    content.add("center", btnReset);
    content.add("br left", new MLabel(Labels.SYNSETS_COLON, 'j', synsetList));
    content.add("br hfill vfill", new JScrollPane(synsetList));
    content.add("br left", infoLabel);
}
 
开发者ID:CLARIN-PL,项目名称:WordnetLoom,代码行数:20,代码来源:SynsetViewUI.java


示例3: mouseClicked

import com.alee.laf.panel.WebPanel; //导入依赖的package包/类
@Override
public void mouseClicked(MouseEvent e) {

    int idx = unitsList.locationToIndex(e.getPoint());

    if (e.getButton() == MouseEvent.BUTTON3 && idx != -1
            && idx != listModel.getSplitPosition()) {
        Sense unit = listModel.getObjectAt(idx);
        unit = RemoteService.senseRemote.fetchSense(unit.getId());

        LexicalUnitPropertiesViewUI lui = new LexicalUnitPropertiesViewUI(graphUI);
        lui.init(workbench);
        DialogWindow dia = new DialogWindow(workbench.getFrame(), Labels.UNIT_PROPERTIES, 585, 520);
        WebPanel pan = new WebPanel();
        lui.initialize(pan);
        lui.refreshData(unit);
        lui.closeWindow((ActionEvent e1) -> {
            dia.dispose();
        });
        dia.setLocationRelativeTo(workbench.getFrame());
        dia.setContentPane(pan);
        dia.pack();
        dia.setVisible(true);
    }
}
 
开发者ID:CLARIN-PL,项目名称:WordnetLoom,代码行数:26,代码来源:SynsetStructureViewUI.java


示例4: initialize

import com.alee.laf.panel.WebPanel; //导入依赖的package包/类
/**
 * @param content JPanel from workbench
 * @author amusial
 */
@Override
protected void initialize(WebPanel content) {
    content.removeAll();
    content.setLayout(new RiverLayout());

    // Create a panel for visualisation visualisation.
    JPanel graph;

    try {
        graph = getSampleGraphViewer();
        content.add(graph, "hfill vfill");
    } catch (IOException ex) {
        logger().error("IO exception", ex);
    }

}
 
开发者ID:CLARIN-PL,项目名称:WordnetLoom,代码行数:21,代码来源:ViwnGraphViewUI.java


示例5: mouseClicked

import com.alee.laf.panel.WebPanel; //导入依赖的package包/类
@Override
public void mouseClicked(MouseEvent e) {

    if (e.getButton() == MouseEvent.BUTTON3) {

        LexicalUnitPropertiesViewUI lui = new LexicalUnitPropertiesViewUI(graphUI);
        lui.init(workbench);

        final DialogWindow dia = new DialogWindow(workbench.getFrame(),
                Labels.UNIT_PROPERTIES, 585, 520);
        WebPanel pan = new WebPanel();
        lui.initialize(pan);
        lui.refreshData(unit);
        lui.fillKPWrExample(examples.getSelectedValues());
        lui.closeWindow((ActionEvent e1) -> {
            dia.dispose();
        });
        dia.setLocationRelativeTo(workbench.getFrame());
        dia.setContentPane(pan);
        dia.pack();
        dia.setVisible(true);

    }
}
 
开发者ID:CLARIN-PL,项目名称:WordnetLoom,代码行数:25,代码来源:ViwnExampleKPWrViewUI.java


示例6: initialize

import com.alee.laf.panel.WebPanel; //导入依赖的package包/类
@Override
protected void initialize(WebPanel content) {

    content.setLayout(new RiverLayout());

    dlm = new DefaultListModel();

    jl = new WebList(dlm);
    jl.setLayoutOrientation(JList.HORIZONTAL_WRAP);
    jl.setVisibleRowCount(1);
    jl.setCellRenderer(new CustomCellRenderer());
    jl.addMouseListener(new LockerMouseAdapter());
    jl.addListSelectionListener(this);

    content.add(new JScrollPane(jl), "hfill vfill");

}
 
开发者ID:CLARIN-PL,项目名称:WordnetLoom,代码行数:18,代码来源:ViwnLockerViewUI.java


示例7: ModalPopup

import com.alee.laf.panel.WebPanel; //导入依赖的package包/类
ModalPopup(AbstractButton invokerButton) {
    mInvoker = invokerButton;

    layerPanel = new WebPanel();
    layerPanel.setOpaque(false);

    JRootPane rootPane = SwingUtils.getRootPane(mInvoker);
    if (rootPane == null) {
        throw new IllegalStateException("not on UI start, dummkopf!");
    }
    installPopupLayer(layerPanel, rootPane);
    layerPanel.addMouseListener(new MouseAdapter() {
        @Override
        public void mouseClicked(MouseEvent e) {
            ModalPopup.this.close();
        }
    });

    this.setRequestFocusOnShow(false);
}
 
开发者ID:kontalk,项目名称:desktopclient-java,代码行数:21,代码来源:ComponentUtils.java


示例8: showAboutDialog

import com.alee.laf.panel.WebPanel; //导入依赖的package包/类
private void showAboutDialog() {
    WebPanel aboutPanel = new WebPanel(new GridLayout(0, 1, View.GAP_SMALL, View.GAP_SMALL));
    aboutPanel.add(new WebLabel("Kontalk Java Client v" + Kontalk.VERSION));
    WebLinkLabel linkLabel = new WebLinkLabel();
    linkLabel.setLink(View.KONTALK_SITE);
    linkLabel.setText(Tr.tr("Visit kontalk.org"));
    aboutPanel.add(linkLabel);
    WebLabel soundLabel = new WebLabel(Tr.tr("Notification sound by")+" FxProSound");
    aboutPanel.add(soundLabel);
    Icon icon = Utils.getIcon("kontalk.png");
    WebOptionPane.showMessageDialog(this,
            aboutPanel,
            Tr.tr("About"),
            WebOptionPane.INFORMATION_MESSAGE,
            icon);
}
 
开发者ID:kontalk,项目名称:desktopclient-java,代码行数:17,代码来源:MainFrame.java


示例9: TabbedEffectDialog

import com.alee.laf.panel.WebPanel; //导入依赖的package包/类
public TabbedEffectDialog(int panes, String title, ImageIcon icon)
{
	dialog = new WebDialog(Spade.main.gui.frame, title);
	if(icon != null)
		dialog.setIconImage(icon.getImage());
	dialog.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
	dialog.setAlwaysOnTop(true);
	dialog.setAutoRequestFocus(true);
	dialog.setShowResizeCorner(false);
	
	panels = new WebPanel[panes];
	JPanel panel = (JPanel) dialog.getContentPane();
	panel.setLayout(new BorderLayout());
	
	tabs = new WebTabbedPane();
	tabs.setTabStretchType(TabStretchType.always);
	panel.add(tabs, BorderLayout.CENTER);
	
	for(int i = 0; i < panes; i++)
	{
		tabs.add(panels[i] = new WebPanel());
	}
	
	bottom = new WebPanel();
	panel.add(bottom, BorderLayout.SOUTH);
}
 
开发者ID:Spade-Editor,项目名称:Spade,代码行数:27,代码来源:TabbedEffectDialog.java


示例10: init

import com.alee.laf.panel.WebPanel; //导入依赖的package包/类
/**
 * Inicjalizacja wygladu
 *
 * @param workbench - sodowisko pracy
 */
public void init(Workbench workbench) {
    this.workbench = workbench;
    mainContentPanel = new WebPanel();
    initialize(mainContentPanel);
    setKeyListeners(mainContentPanel);
}
 
开发者ID:CLARIN-PL,项目名称:WordnetLoom,代码行数:12,代码来源:AbstractViewUI.java


示例11: initialize

import com.alee.laf.panel.WebPanel; //导入依赖的package包/类
@Override
public void initialize(final WebPanel content) {
    this.content = content;
    this.content.setLayout(new RiverLayout());
    editPanel = new LexicalUnitPropertiesPanel(graphUI.getWorkbench().getFrame());
    content.add("hfill", editPanel);

    editPanel.getBtnSave().addActionListener((ActionEvent e) -> {
        editPanel.getBtnSave().setEnabled(false);
        saveChangesInUnit();
        editPanel.getBtnSave().setEnabled(false);
    });
}
 
开发者ID:CLARIN-PL,项目名称:WordnetLoom,代码行数:14,代码来源:LexicalUnitPropertiesViewUI.java


示例12: initialize

import com.alee.laf.panel.WebPanel; //导入依赖的package包/类
@Override
protected void initialize(WebPanel content) {

    content.setLayout(new RiverLayout());

    definitionValue = new MTextArea(Labels.VALUE_UNKNOWN);
    definitionValue.addCaretListener(this);
    definitionValue.setRows(3);

    commentValue = new MTextArea(Labels.VALUE_UNKNOWN);
    commentValue.addCaretListener(this);
    commentValue.setRows(3);

    abstractValue = new JCheckBox(Labels.ARTIFICIAL);
    abstractValue.setSelected(false);
    abstractValue.addActionListener(this);

    content.add("vtop", new JLabel(Labels.DEFINITION_COLON));
    content.add("tab hfill", new JScrollPane(definitionValue));
    content.add("br vtop", new JLabel(Labels.COMMENT_COLON));
    content.add("tab hfill", new JScrollPane(commentValue));
    content.add("br", abstractValue);
    content.add("br center", buttonSave);

    // ustawienie akywnosci
    commentValue.setEnabled(false);
    definitionValue.setEnabled(false);
    abstractValue.setEnabled(false);
}
 
开发者ID:CLARIN-PL,项目名称:WordnetLoom,代码行数:30,代码来源:SynsetPropertiesViewUI.java


示例13: initialize

import com.alee.laf.panel.WebPanel; //导入依赖的package包/类
@Override
protected void initialize(WebPanel content) {
    rootPanel = content;
    content.setLayout(new RiverLayout());

    // Create and add a panel for visualisation visualization.
    content.add(getSatelliteGraphViewer(), "hfill vfill");
}
 
开发者ID:CLARIN-PL,项目名称:WordnetLoom,代码行数:9,代码来源:ViwnSatelliteGraphViewUI.java


示例14: initialize

import com.alee.laf.panel.WebPanel; //导入依赖的package包/类
@Override
protected void initialize(WebPanel content) {
    getContent().setLayout(new RiverLayout());
    examples = new JList(listModel) {

        private static final long serialVersionUID = 1L;

        @Override
        public boolean getScrollableTracksViewportWidth() {
            return true;
        }
    };
    examples.setCellRenderer(new ExampleCellRenderer());

    ComponentListener l = new ComponentAdapter() {

        @Override
        public void componentResized(ComponentEvent e) {
            examples.setFixedCellHeight(10);
            examples.setFixedCellHeight(-1);
        }

    };

    examples.addComponentListener(l);
    examples.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
    examples.addMouseListener(this);
    scroll = new JScrollPane(examples);
    getContent().add(scroll, "hfill vfill");
}
 
开发者ID:CLARIN-PL,项目名称:WordnetLoom,代码行数:31,代码来源:ViwnExampleKPWrViewUI.java


示例15: initialize

import com.alee.laf.panel.WebPanel; //导入依赖的package包/类
@Override
protected void initialize(WebPanel content) {
    content.setLayout(new RiverLayout());

    root = new DefaultMutableTreeNode("");
    tree = new WebTree(root);
    tree.addTreeSelectionListener(this);
    tree.setCellRenderer(new ViwnLexicalUnitRelationRenderer());

    root_from = new DefaultMutableTreeNode(Labels.FROM);
    root_to = new DefaultMutableTreeNode(Labels.TO);

    root.add(root_from);
    root.add(root_to);

    addRelationButton = MButton.buildAddButton(this)
            .withEnabled(true)
            .withToolTip(Hints.ADD_RELATION_UNITS);

    installViewScopeShortCut(addRelationButton, 0, KeyEvent.VK_INSERT);

    deleteRelationButton = MButton.buildDeleteButton(this)
            .withEnabled(true)
            .withToolTip(Hints.REMOVE_RELTAION_UNITS);

    installViewScopeShortCut(deleteRelationButton, 0, KeyEvent.VK_DELETE);

    content.add("hfill vfill", new JScrollPane(tree));
    content.add("br center", addRelationButton);
    content.add(deleteRelationButton);
}
 
开发者ID:CLARIN-PL,项目名称:WordnetLoom,代码行数:32,代码来源:ViwnLexicalUnitRelationsViewUI.java


示例16: initialize

import com.alee.laf.panel.WebPanel; //导入依赖的package包/类
@Override
protected void initialize(WebPanel content) {
    getContent().setLayout(new RiverLayout());
    ta = new JTextPane();
    ta.setContentType("text/html");
    ta.setEditable(false);
    scroll = new JScrollPane(ta);
    getContent().add(scroll, "hfill vfill");
}
 
开发者ID:CLARIN-PL,项目名称:WordnetLoom,代码行数:10,代码来源:ViwnExamplesViewUI.java


示例17: initView

import com.alee.laf.panel.WebPanel; //导入依赖的package包/类
@Override
protected void initView() {
    add("",
            new MLabel(Labels.RELATION_TYPE_COLON, 't', relationType));
    add("tab hfill", relationType);
    add("br", new MLabel(Labels.RELATION_SUBTYPE_COLON, 'y',
            relationType));
    add("tab hfill", relationSubType);
    add("br", new MLabel(Labels.RELATION_DESC_COLON, '\0',
            description));
    add("br hfill", new JScrollPane(description));

    jp = new WebPanel();
    jp.setLayout(new RiverLayout());
    jp.add("br", new MLabel(Labels.SOURCE_SYNSET_COLON, 'r', parentItem));
    jp.add("tab hfill", parentItem);
    jp.add("br", new MLabel(Labels.TARGET_SYNSET_COLON, 'd', childItem));
    jp.add("tab hfill", childItem);

    add("br hfill", jp);
    add("", buttonSwitch);

    add("br", new MLabel(Labels.TESTS_COLON, '\0', testsList));
    add("br hfill vfill", new JScrollPane(testsList));
    add("br center", buttonChoose);
    add("", buttonCancel);
}
 
开发者ID:CLARIN-PL,项目名称:WordnetLoom,代码行数:28,代码来源:MakeNewRelationWindow.java


示例18: main

import com.alee.laf.panel.WebPanel; //导入依赖的package包/类
public static void main ( final String[] args )
{
	
	SwingUtilities.invokeLater(() ->  {
		
     WebLookAndFeel.install();
     UIManagers.initialize();
  
     final CustomSkin defaultSkin = new CustomSkin ( Example.class, "ExampleSkin.xml" );
     final CustomSkin darkSkin = new CustomSkin ( Example.class, "DarkExampleSkin.xml" );
     StyleManager.setSkin ( defaultSkin );
     HotkeyManager.registerHotkey ( Hotkey.CTRL_SPACE, new HotkeyRunnable ()
     {
         @Override
         public void run ( final KeyEvent e )
         {
             StyleManager.setSkin ( StyleManager.getSkin () == defaultSkin ? darkSkin : defaultSkin );
         }
     } );
	
     final WebPanel panel = new WebPanel ( ExampleStyles.shaded, new VerticalFlowLayout ( true, true ) );
	
     final WebLabel title = new WebLabel ( ExampleStyles.title.at ( panel ), "Panel Title" );
     panel.add ( title );
	
     final WebSeparator separator = new WebSeparator ( ExampleStyles.line.at ( panel ) );
     panel.add ( separator );
	
     final WebScrollPane scrollPane = new WebScrollPane ( ExampleStyles.scroll.at ( panel ) );
     scrollPane.setHorizontalScrollBarPolicy ( WebScrollPane.HORIZONTAL_SCROLLBAR_NEVER );
     scrollPane.getViewport ().setView ( new WebTextArea ( ExampleStyles.text.at ( scrollPane ), 3, 20 ) );
     panel.add ( scrollPane );
	
     TestFrame.show ( panel );
     
	});

}
 
开发者ID:mars-sim,项目名称:mars-sim,代码行数:39,代码来源:Example.java


示例19: showPasswordDialog

import com.alee.laf.panel.WebPanel; //导入依赖的package包/类
void showPasswordDialog(boolean wasWrong) {
    WebPanel passPanel = new WebPanel();
    WebLabel passLabel = new WebLabel(Tr.tr("Please enter your key password:"));
    passPanel.add(passLabel, BorderLayout.NORTH);
    final WebPasswordField passField = new WebPasswordField();
    passPanel.add(passField, BorderLayout.CENTER);
    if (wasWrong) {
        WebLabel wrongLabel = new WebLabel(Tr.tr("Wrong password"));
        wrongLabel.setForeground(Color.RED);
        passPanel.add(wrongLabel, BorderLayout.SOUTH);
    }
    WebOptionPane passPane = new WebOptionPane(passPanel,
            WebOptionPane.QUESTION_MESSAGE,
            WebOptionPane.OK_CANCEL_OPTION);
    JDialog dialog = passPane.createDialog(mMainFrame, Tr.tr("Enter password"));
    dialog.setModal(true);
    dialog.addWindowFocusListener(new WindowAdapter() {
        @Override
        public void windowGainedFocus(WindowEvent e) {
            passField.requestFocusInWindow();
        }
    });
    // blocking
    LOGGER.info("asking for password…");
    dialog.setVisible(true);

    Object value = passPane.getValue();
    if (value != null && value.equals(WebOptionPane.OK_OPTION))
        mControl.connect(passField.getPassword());
}
 
开发者ID:kontalk,项目名称:desktopclient-java,代码行数:31,代码来源:View.java


示例20: showPresenceError

import com.alee.laf.panel.WebPanel; //导入依赖的package包/类
void showPresenceError(Contact contact, RosterHandler.Error error) {
    WebPanel panel = panel(Tr.tr("Contact error"), contact);

    panel.add(new WebLabel(Tr.tr("Error:")).setBoldFont());
    String errorText = Tr.tr(error.toString());
    switch (error) {
        case SERVER_NOT_FOUND:
            errorText = Tr.tr("Server not found");
            break;
    }

    panel.add(textArea(errorText));

    NotificationManager.showNotification(mWindow, panel, NotificationOption.cancel);
}
 
开发者ID:kontalk,项目名称:desktopclient-java,代码行数:16,代码来源:Notifier.java



注:本文中的com.alee.laf.panel.WebPanel类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java GenericRowMapper类代码示例发布时间:2022-05-22
下一篇:
Java SecretManagerState类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap