Package com.alee.laf.panel

Examples of com.alee.laf.panel.WebPanel


        container.add ( statusbar, BorderLayout.SOUTH );
    }

    private void initializeViewer ()
    {
        componentViewer = new WebPanel ( new VerticalFlowLayout ( VerticalFlowLayout.TOP, 0, 15, true, false ) );
        componentViewer.setMargin ( 10 );

        final WebScrollPane previewScroll = new WebScrollPane ( componentViewer, false );
        previewScroll.setScrollBarStyleId ( "preview-scroll" );
        previewScroll.setVerticalScrollBarPolicy ( ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS );
View Full Code Here


    {
        final SupportedComponent type = SupportedComponent.getComponentTypeByUIClassID ( view.getUIClassID () );

        final WebLabel titleLabel = new WebLabel ( title, type.getIcon () ).setMargin ( 0, 7, 3, 0 );

        final WebPanel boundsPanel = new WebPanel ( displayedView );
        boundsPanel.setStyleId ( "empty-border" );
        boundsPanels.add ( boundsPanel );

        final WebPanel viewPanel = new WebPanel ( center ? new CenterPanel ( boundsPanel ) : boundsPanel );
        viewPanel.setStyleId ( "inner-shade" );

        final WebPanel container = new WebPanel ( new BorderLayout ( 0, 0 ) );
        container.add ( titleLabel, BorderLayout.NORTH );
        container.add ( viewPanel, BorderLayout.CENTER );
        componentViewer.add ( container );

        titleLabel.addMouseListener ( new MouseAdapter ()
        {
            @Override
View Full Code Here

    private void initializeEditors ()
    {
        // Creating XML editors tabbed pane
        final WebTabbedPane editorTabs = new WebTabbedPane ( TabbedPaneStyle.attached );
        editorsContainer = new WebPanel ( false, editorTabs );

        // Loading editor code theme
        final Theme theme = loadXmlEditorTheme ();

        // Parsing all related files
        final List<String> xmlContent = new ArrayList<String> ();
        final List<String> xmlNames = new ArrayList<String> ();
        final List<ResourceFile> xmlFiles = new ArrayList<ResourceFile> ();
        loadSkinSources ( xmlContent, xmlNames, xmlFiles );

        // Creating editor tabs
        editors = new ArrayList<WebSyntaxArea> ( xmlContent.size () );
        for ( int i = 0; i < xmlContent.size (); i++ )
        {
            final WebPanel tabContent = new WebPanel ();
            tabContent.add ( new TabContentSeparator (), BorderLayout.NORTH );
            tabContent.add ( createSingleXmlEditor ( theme, xmlContent.get ( i ), xmlFiles.get ( i ) ), BorderLayout.CENTER );
            editorTabs.addTab ( xmlNames.get ( i ), tabContent );
            editorTabs.setIconAt ( i, tabIcon );
        }

        // Adding XML editors container into split
View Full Code Here

        setIconImages ( getDialogIcons ( messageType ) );
        setLayout ( new BorderLayout () );

        this.parentComponent = parentComponent;

        container = new WebPanel ( new BorderLayout ( 15, 15 ) );
        container.setMargin ( 15, 15, 8, 15 );
        add ( container, BorderLayout.CENTER );

        // Icon
        ImageIcon typeIcon = getLargeIcon ( messageType );
        if ( typeIcon != null )
        {
            WebImage image = new WebImage ( typeIcon );
            image.setVerticalAlignment ( WebImage.TOP );
            container.add ( new CenterPanel ( image, false, true ), BorderLayout.WEST );
        }

        // Message
        setContent ( message, false );

        // South panel
        controls = new WebPanel ( new BorderLayout ( 15, 15 ) );
        container.add ( controls, BorderLayout.SOUTH );

        // Buttons
        centerer = new WebPanel ();
        controls.add ( centerer, BorderLayout.CENTER );
        buttons = new WebPanel ( new HorizontalFlowLayout ( 5, false ) );

        // Special content
        setSpecialComponent ( special );

        // Yes
View Full Code Here

        setRound ( StyleConstants.smallRound );
        setLayout ( new BorderLayout ( 0, 0 ) );

        // Header

        headerPanel = new WebPanel ();
        headerPanel.setOpaque ( true );
        headerPanel.setUndecorated ( false );
        headerPanel.setShadeWidth ( 0 );
        headerPanel.setLayout ( new BorderLayout () );
        headerPanel.addMouseListener ( new MouseAdapter ()
        {
            @Override
            public void mouseReleased ( final MouseEvent e )
            {
                if ( isAllowAction ( e ) )
                {
                    invertExpandState ();
                    takeFocus ();
                }
            }

            private boolean isAllowAction ( final MouseEvent e )
            {
                return SwingUtilities.isLeftMouseButton ( e ) && SwingUtils.size ( WebCollapsiblePane.this ).contains ( e.getPoint () );
            }
        } );
        headerPanel.addKeyListener ( new KeyAdapter ()
        {
            @Override
            public void keyReleased ( final KeyEvent e )
            {
                if ( Hotkey.ENTER.isTriggered ( e ) || Hotkey.SPACE.isTriggered ( e ) )
                {
                    invertExpandState ();
                }
            }
        } );
        updateHeaderPosition ();

        updateDefaultTitleComponent ( icon, title );
        updateDefaultTitleBorder ();

        expandButton = new WebButton ( collapseIcon );
        expandButton.setUndecorated ( true );
        expandButton.setFocusable ( false );
        expandButton.setMoveIconOnPress ( false );
        expandButton.addActionListener ( new ActionListener ()
        {
            @Override
            public void actionPerformed ( final ActionEvent e )
            {
                invertExpandState ();
                takeFocus ();
            }
        } );
        setStateIcons ();
        updateStateIconMargin ();
        updateStateIconPosition ();

        // Content

        contentPanel = new WebPanel ()
        {
            @Override
            public Dimension getPreferredSize ()
            {
                final Dimension ps = super.getPreferredSize ();
View Full Code Here

        iconImage = new WebImage ();
        westPanel = new AlignPanel ( iconImage, SwingConstants.CENTER, SwingConstants.CENTER );
        updateIcon ();

        contentPanel = new WebPanel ();
        contentPanel.setOpaque ( false );
        centerPanel = new AlignPanel ( contentPanel, SwingConstants.CENTER, SwingConstants.CENTER );
        updateContent ();

        optionsPanel = new WebPanel ( new HorizontalFlowLayout ( 4, false ) );
        optionsPanel.setOpaque ( false );
        southPanel = new AlignPanel ( optionsPanel, SwingConstants.RIGHT, SwingConstants.CENTER );
        updateOptions ();

        addMouseListener ( new MouseAdapter ()
View Full Code Here

    {
        // Default styling
        setWebColoredBackground ( false );

        // Elements layout
        container = new WebPanel ();
        container.setLayout ( new ComponentPanelLayout () );
        add ( container, BorderLayout.CENTER );

        // Previous action hotkeys
        final HotkeyRunnable prevAction = new HotkeyRunnable ()
View Full Code Here

        treeScroll.setPreferredWidth ( 400 );

        // Panel content
        setLayout ( new BorderLayout ( 0, 3 ) );
        add ( contolsToolbar, BorderLayout.NORTH );
        final WebPanel panel = new WebPanel ( new BorderLayout ( 0, 1 ) );
        panel.setMargin ( 0, 3, 2, 3 );
        panel.add ( webPathField, BorderLayout.NORTH );
        panel.add ( treeScroll, BorderLayout.CENTER );
        add ( panel, BorderLayout.CENTER );

        updateSelectedDirectory ( null, true, true );
        updateToolbarControlsState ();
    }
View Full Code Here

        list.requestFocusInWindow ();
    }

    private void installTip ( final File file, final JComponent component, final boolean showFullName )
    {
        final WebPanel panel = new WebPanel ( new VerticalFlowLayout ( 4, 4 ) );
        panel.setOpaque ( false );

        if ( showFullName )
        {
            // Full file name
            panel.add ( new WebLabel ( FileUtils.getDisplayFileName ( file ), FileUtils.getFileIcon ( file ) ) );
            panel.add ( new WebSeparator ( false, WebSeparator.HORIZONTAL, true ) );
        }

        // File description
        panel.add ( new WebLabel ( FileUtils.getFileTypeDescription ( file ), typeIcon ) );

        if ( FileUtils.isFile ( file ) )
        {
            // File modification date
            panel.add ( new WebLabel ( FileUtils.getDisplayFileModificationDate ( file ), dateIcon ) );

            // File size
            panel.add ( new WebLabel ( FileUtils.getDisplayFileSize ( file ), sizeIcon ) );
        }

        // Registering tooltip
        TooltipManager.setTooltip ( component, panel );
View Full Code Here

        setIconImages ( WebLookAndFeel.getImages () );


        setLayout ( new BorderLayout () );

        final WebPanel area = new WebPanel ( new AlphaLayerPainter () );
        area.setMargin ( Math.max ( 5, 80 - image.getWidth () ) );
        add ( area );

        area.add ( image );


        setDefaultCloseOperation ( JFrame.EXIT_ON_CLOSE );
        setResizable ( true );
        pack ();
View Full Code Here

TOP

Related Classes of com.alee.laf.panel.WebPanel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.