com.alee.laf.scroll.WebScrollPane Java Examples
The following examples show how to use
com.alee.laf.scroll.WebScrollPane.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: WebTreeExample.java From weblaf with GNU General Public License v3.0 | 6 votes |
@NotNull @Override protected List<? extends JComponent> createPreviewElements () { final WebTree left = new WebTree ( getStyleId () ); left.setVisibleRowCount ( 8 ); left.setEditable ( true ); left.setTransferHandler ( createTransferHandler () ); left.setDragEnabled ( true ); left.setDropMode ( DropMode.ON_OR_INSERT ); final WebScrollPane leftScroll = new WebScrollPane ( left ).setPreferredWidth ( 200 ); final WebTree right = new WebTree ( getStyleId () ); right.setVisibleRowCount ( 8 ); right.setEditable ( true ); right.setTransferHandler ( createTransferHandler () ); right.setDragEnabled ( true ); right.setDropMode ( DropMode.ON_OR_INSERT ); final WebScrollPane rightScroll = new WebScrollPane ( right ).setPreferredWidth ( 200 ); return CollectionUtils.asList ( leftScroll, rightScroll ); }
Example #2
Source File: AboutLibraryDialog.java From weblaf with GNU General Public License v3.0 | 6 votes |
/** * Returns properties tab content. * * @return properties tab content */ @NotNull private Component createPropertiesTab () { final Object[][] systemPropertiesData = createSystemPropertiesData (); final String key = LM.get ( "weblaf.about.dialog.properties.key" ); final String value = LM.get ( "weblaf.about.dialog.properties.value" ); final String[] colums = { key, value }; final DefaultTableModel model = new DefaultTableModel ( systemPropertiesData, colums ); final WebTable propertiesTable = new WebTable ( StyleId.tableTransparent, model ); propertiesTable.setPreferredScrollableViewportSize ( new Dimension ( 1, 1 ) ); propertiesTable.setEditable ( false ); return new WebScrollPane ( StyleId.scrollpaneTransparentHovering, propertiesTable ); }
Example #3
Source File: WebFileChooserPanel.java From weblaf with GNU General Public License v3.0 | 6 votes |
/** * Creates file tree and all related components. */ protected void createFileTree () { treeScroll = new WebScrollPane ( StyleId.filechooserNavScroll.at ( centralSplit ) ); treeScroll.setPreferredSize ( new Dimension ( dividerLocation, 1 ) ); fileTree = new WebFileTree ( StyleId.filechooserFileTree.at ( treeScroll ) ); fileTree.setExpandSelected ( true ); fileTree.setSelectionMode ( TreeSelectionModel.SINGLE_TREE_SELECTION ); treeScroll.setViewportView ( fileTree ); fileTreeListener = new TreeSelectionListener () { @Override public void valueChanged ( final TreeSelectionEvent e ) { if ( fileTree.getSelectionCount () > 0 ) { updateCurrentFolder ( fileTree.getSelectedFile (), UpdateSource.tree ); } } }; fileTree.addTreeSelectionListener ( fileTreeListener ); }
Example #4
Source File: NinePatchEditor.java From weblaf with GNU General Public License v3.0 | 6 votes |
public NinePatchEditor () { super (); ninePatchImage = null; ninePatchIcon = null; WebLookAndFeel.setOrientation ( this ); setOpaque ( false ); setFocusable ( true ); setLayout ( new TableLayout ( new double[][]{ { RULER_LENGTH, TableLayout.PREFERRED, TableLayout.FILL }, { RULER_LENGTH, TableLayout.PREFERRED, TableLayout.FILL } } ) ); setFont ( new JLabel ().getFont ().deriveFont ( 10f ) ); view = new WebScrollPane ( StyleId.scrollpaneTransparentHovering, this ); final NinePatchEditorMouseAdapter mouseAdapter = new NinePatchEditorMouseAdapter (); addMouseListener ( mouseAdapter ); addMouseMotionListener ( mouseAdapter ); addMouseWheelListener ( mouseAdapter ); }
Example #5
Source File: UACBypassPanel.java From lnk2pwn with MIT License | 6 votes |
private WebPanel createUACCommandPanel() { MigLayout layout = new MigLayout("", "[grow][grow]", "[][grow]"); WebPanel panel = new WebPanel(); panel.setLayout(layout); panel.add(new WebLabel("Command")); panel.add(new WebLabel("Output"), "wrap"); uacCommandTextArea.setLineWrap(true); uacCommandTextArea.setBackground(COMMAND_BG_COLOR); uacCommandTextArea.setForeground(Color.WHITE); uacOuputTextArea.setLineWrap(true); uacOuputTextArea.setBackground(COMMAND_BG_COLOR); uacOuputTextArea.setForeground(Color.WHITE); WebScrollPane uacCommandAreaScroll = new WebScrollPane(uacCommandTextArea); WebScrollPane uacOuputAreaScroll = new WebScrollPane(uacOuputTextArea); panel.add(uacCommandAreaScroll, "w 100%, h 100%, hmin 250"); panel.add(uacOuputAreaScroll, "w 100%, h 100%, hmin 250"); return panel; }
Example #6
Source File: EmergencySupplyMissionCustomInfoPanel.java From mars-sim with GNU General Public License v3.0 | 6 votes |
/** * Constructor. */ public EmergencySupplyMissionCustomInfoPanel() { // Use JPanel constructor super(); // Set the layout. setLayout(new BorderLayout()); // Create the emergency supplies label. WebLabel emergencySuppliesLabel = new WebLabel(Msg.getString("EmergencySupplyMissionCustomInfoPanel.emergencySupplies"), WebLabel.LEFT); //$NON-NLS-1$ add(emergencySuppliesLabel, BorderLayout.NORTH); // Create a scroll pane for the emergency supplies table. WebScrollPane emergencySuppliesScrollPane = new WebScrollPane(); emergencySuppliesScrollPane.setPreferredSize(new Dimension(-1, -1)); add(emergencySuppliesScrollPane, BorderLayout.CENTER); // Create the emergency supplies table and model. emergencySuppliesTableModel = new EmergencySuppliesTableModel(); WebTable emergencySuppliesTable = new WebTable(emergencySuppliesTableModel); emergencySuppliesScrollPane.setViewportView(emergencySuppliesTable); }
Example #7
Source File: CommanderWindow.java From mars-sim with GNU General Public License v3.0 | 6 votes |
@Override public void actionPerformed(ActionEvent event) { JRadioButton button = (JRadioButton) event.getSource(); if (button == r0) { settlement.setMissionDisable(Trade.DEFAULT_DESCRIPTION, false); } else if (button == r1) { settlement.setMissionDisable(Trade.DEFAULT_DESCRIPTION, true); } else if (button == r2) { SwingUtilities.invokeLater(() -> { r3.setText(ALLOW); // System.out.println("r2 selected"); disableAllCheckedSettlement(); // settlementMissionList.setEnabled(false); policyMainPanel.remove(WebScrollPane); policyMainPanel.add(emptyPanel, BorderLayout.EAST); }); } else if (button == r3) { // settlementMissionList.setEnabled(true); r3.setText(ALLOW + SEE_RIGHT); policyMainPanel.remove(emptyPanel); policyMainPanel.add(WebScrollPane, BorderLayout.EAST); } }
Example #8
Source File: ArrivedListPanel.java From mars-sim with GNU General Public License v3.0 | 6 votes |
/** * Constructor. */ public ArrivedListPanel() { // Use WebPanel constructor super(); setLayout(new BorderLayout()); setBorder(new TitledBorder(Msg.getString("ArrivedListPanel.arrivedTransportItems"))); //$NON-NLS-1$ setPreferredSize(new Dimension(200, 200)); // Create arrived list. listModel = new ArrivedListModel(); arrivedList = new JList<Object>(listModel); arrivedList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); WebScrollPane scrollPane = new WebScrollPane(arrivedList); scrollPane.setHorizontalScrollBarPolicy(WebScrollPane.HORIZONTAL_SCROLLBAR_NEVER); add(scrollPane, BorderLayout.CENTER); }
Example #9
Source File: IncomingListPanel.java From mars-sim with GNU General Public License v3.0 | 6 votes |
/** * Constructor. */ public IncomingListPanel() { // Use WebPanel constructor super(); setLayout(new BorderLayout()); setBorder(new TitledBorder(Msg.getString("IncomingListPanel.title"))); //$NON-NLS-1$ setPreferredSize(new Dimension(225, 200)); // Create incoming list. listModel = new IncomingListModel(); incomingList = new JList<Object>(listModel); incomingList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); WebScrollPane scrollPane = new WebScrollPane(incomingList); scrollPane.setHorizontalScrollBarPolicy(WebScrollPane.HORIZONTAL_SCROLLBAR_NEVER); add(scrollPane, BorderLayout.CENTER); }
Example #10
Source File: ExplorationCustomInfoPanel.java From mars-sim with GNU General Public License v3.0 | 6 votes |
/** * Constructor. */ public ExplorationCustomInfoPanel() { // Use JPanel constructor super(); setLayout(new BorderLayout()); // Create the main scroll panel. WebScrollPane mainScrollPane = new WebScrollPane(); add(mainScrollPane, BorderLayout.NORTH); // Create main panel. mainPane = Box.createVerticalBox(); mainScrollPane.setViewportView(mainPane); sitePanes = new HashMap<String, ExplorationSitePanel>(5); }
Example #11
Source File: TreeTooltipExample.java From weblaf with GNU General Public License v3.0 | 6 votes |
@NotNull @Override protected List<? extends JComponent> createPreviewElements () { final JTree tree = new JTree (); tree.setVisibleRowCount ( 8 ); tree.setCellRenderer ( new WebTreeCellRenderer<TreeNode, JTree, TreeNodeParameters<TreeNode, JTree>> () { @Override protected void updateView ( @NotNull final TreeNodeParameters<TreeNode, JTree> parameters ) { super.updateView ( parameters ); setToolTipText ( textForValue ( parameters ) ); } } ); ToolTipManager.sharedInstance ().registerComponent ( tree ); return CollectionUtils.asList ( new WebScrollPane ( tree ).setPreferredWidth ( 200 ) ); }
Example #12
Source File: TreeTooltipExample.java From weblaf with GNU General Public License v3.0 | 6 votes |
@NotNull @Override protected List<? extends JComponent> createPreviewElements () { final WebTree tree = new WebTree (); tree.setVisibleRowCount ( 8 ); tree.setCellRenderer ( new WebTreeCellRenderer<TreeNode, JTree, TreeNodeParameters<TreeNode, JTree>> () { @Override protected void updateView ( @NotNull final TreeNodeParameters<TreeNode, JTree> parameters ) { super.updateView ( parameters ); setToolTipText ( textForValue ( parameters ) ); } } ); ToolTipManager.sharedInstance ().registerComponent ( tree ); return CollectionUtils.asList ( new WebScrollPane ( tree ).setPreferredWidth ( 200 ) ); }
Example #13
Source File: TreeTooltipExample.java From weblaf with GNU General Public License v3.0 | 6 votes |
@NotNull @Override protected List<? extends JComponent> createPreviewElements () { final JTree tree = new JTree (); tree.setVisibleRowCount ( 8 ); tree.putClientProperty ( WebTree.TOOLTIP_PROVIDER_PROPERTY, new TreeToolTipProvider<DefaultMutableTreeNode> () { @Nullable @Override protected String getToolTipText ( @NotNull final JTree component, @NotNull final TreeCellArea<DefaultMutableTreeNode, JTree> area ) { return LM.get ( getPreviewLanguageKey ( "node" ), area.row (), area.getValue ( tree ).getUserObject () ); } } ); return CollectionUtils.asList ( new WebScrollPane ( tree ).setPreferredWidth ( 200 ) ); }
Example #14
Source File: WebAsyncTreeExample.java From weblaf with GNU General Public License v3.0 | 6 votes |
@NotNull @Override protected List<? extends JComponent> createPreviewElements () { final AsyncTreeDataProvider<SampleNode> leftDataProvider = SampleData.createDelayingAsyncDataProvider (); final WebAsyncTree left = new WebAsyncTree ( getStyleId (), leftDataProvider, new SampleTreeCellEditor () ); left.setVisibleRowCount ( 8 ); left.setDragEnabled ( true ); left.setDropMode ( DropMode.ON_OR_INSERT ); left.setTransferHandler ( createTransferHandler () ); final WebScrollPane leftScroll = new WebScrollPane ( left ).setPreferredWidth ( 200 ); final AsyncTreeDataProvider<SampleNode> rightDataProvider = SampleData.createDelayingAsyncDataProvider (); final WebAsyncTree right = new WebAsyncTree ( getStyleId (), rightDataProvider, new SampleTreeCellEditor () ); right.setVisibleRowCount ( 8 ); right.setDragEnabled ( true ); right.setDropMode ( DropMode.ON_OR_INSERT ); right.setTransferHandler ( createTransferHandler () ); final WebScrollPane rightScroll = new WebScrollPane ( right ).setPreferredWidth ( 200 ); return CollectionUtils.asList ( leftScroll, rightScroll ); }
Example #15
Source File: WebExTreeExample.java From weblaf with GNU General Public License v3.0 | 6 votes |
@NotNull @Override protected List<? extends JComponent> createPreviewElements () { final ExTreeDataProvider<SampleNode> leftDataProvider = SampleData.createExTreeDataProvider (); final WebExTree left = new WebExTree ( getStyleId (), leftDataProvider, new SampleTreeCellEditor () ); left.setVisibleRowCount ( 8 ); left.setDragEnabled ( true ); left.setDropMode ( DropMode.ON_OR_INSERT ); left.setTransferHandler ( createTransferHandler () ); final WebScrollPane leftScroll = new WebScrollPane ( left ).setPreferredWidth ( 200 ); final ExTreeDataProvider<SampleNode> rightDataProvider = SampleData.createExTreeDataProvider (); final WebExTree right = new WebExTree ( getStyleId (), rightDataProvider, new SampleTreeCellEditor () ); right.setVisibleRowCount ( 8 ); right.setDragEnabled ( true ); right.setDropMode ( DropMode.ON_OR_INSERT ); right.setTransferHandler ( createTransferHandler () ); final WebScrollPane rightScroll = new WebScrollPane ( right ).setPreferredWidth ( 200 ); return CollectionUtils.asList ( leftScroll, rightScroll ); }
Example #16
Source File: JEditorPaneExample.java From weblaf with GNU General Public License v3.0 | 5 votes |
@NotNull @Override protected List<? extends JComponent> createPreviewElements () { final JEditorPane editorPane = new JEditorPane ( "text/html", createHtmlText () ); editorPane.setEditable ( false ); editorPane.putClientProperty ( StyleId.STYLE_PROPERTY, getStyleId () ); return CollectionUtils.asList ( new WebScrollPane ( editorPane ) ); }
Example #17
Source File: WebCheckBoxListExample.java From weblaf with GNU General Public License v3.0 | 5 votes |
@NotNull @Override protected List<? extends JComponent> createPreviewElements () { final WebCheckBoxList list = new WebCheckBoxList ( getStyleId (), createModel ( createLongData () ) ); list.setVisibleRowCount ( 4 ); list.setEditable ( true ); return CollectionUtils.asList ( new WebScrollPane ( list ) ); }
Example #18
Source File: WebCheckBoxListExample.java From weblaf with GNU General Public License v3.0 | 5 votes |
@NotNull @Override protected List<? extends JComponent> createPreviewElements () { final WebCheckBoxList list = new WebCheckBoxList ( getStyleId (), createModel ( createLongData () ) ); list.setVisibleRowCount ( 4 ); return CollectionUtils.asList ( new WebScrollPane ( list ) ); }
Example #19
Source File: JEditorPaneExample.java From weblaf with GNU General Public License v3.0 | 5 votes |
@NotNull @Override protected List<? extends JComponent> createPreviewElements () { final JEditorPane editorPane = new JEditorPane ( "text/html", createHtmlText () ); editorPane.putClientProperty ( StyleId.STYLE_PROPERTY, getStyleId () ); return CollectionUtils.asList ( new WebScrollPane ( editorPane ) ); }
Example #20
Source File: WebFileListExample.java From weblaf with GNU General Public License v3.0 | 5 votes |
@NotNull @Override protected List<? extends JComponent> createPreviewElements () { final WebFileList list = new WebFileList ( getStyleId (), FileUtils.getUserHome () ); list.setEditable ( true ); return CollectionUtils.asList ( new WebScrollPane ( list ) ); }
Example #21
Source File: WebFileListExample.java From weblaf with GNU General Public License v3.0 | 5 votes |
@NotNull @Override protected List<? extends JComponent> createPreviewElements () { final WebFileList list = new WebFileList ( getStyleId (), FileUtils.getUserHome () ); return CollectionUtils.asList ( new WebScrollPane ( list ) ); }
Example #22
Source File: JTreeExample.java From weblaf with GNU General Public License v3.0 | 5 votes |
@NotNull @Override protected List<? extends JComponent> createPreviewElements () { final JTree tree = new JTree (); tree.putClientProperty ( StyleId.STYLE_PROPERTY, getStyleId () ); tree.setVisibleRowCount ( 8 ); tree.setEditable ( true ); return CollectionUtils.asList ( new WebScrollPane ( tree ).setPreferredWidth ( 200 ) ); }
Example #23
Source File: JTreeExample.java From weblaf with GNU General Public License v3.0 | 5 votes |
@NotNull @Override protected List<? extends JComponent> createPreviewElements () { final JTree tree = new JTree (); tree.putClientProperty ( StyleId.STYLE_PROPERTY, getStyleId () ); tree.setVisibleRowCount ( 8 ); return CollectionUtils.asList ( new WebScrollPane ( tree ).setPreferredWidth ( 200 ) ); }
Example #24
Source File: WebTreeFilterFieldExample.java From weblaf with GNU General Public License v3.0 | 5 votes |
@NotNull @Override protected List<? extends JComponent> createPreviewElements () { final ExTreeDataProvider<SampleNode> dataProvider = SampleData.createExTreeDataProvider (); final WebExCheckBoxTree tree = new WebExCheckBoxTree ( getStyleId (), dataProvider, new SampleTreeCellEditor () ); tree.setVisibleRowCount ( 8 ); final WebScrollPane treeScroll = new WebScrollPane ( tree ); treeScroll.setPreferredWidth ( 200 ); final WebTreeFilterField filterField = new WebTreeFilterField ( tree ); return CollectionUtils.asList ( new GroupPanel ( 8, false, filterField, treeScroll ) ); }
Example #25
Source File: WebTreeFilterFieldExample.java From weblaf with GNU General Public License v3.0 | 5 votes |
@NotNull @Override protected List<? extends JComponent> createPreviewElements () { final AsyncTreeDataProvider<SampleNode> dataProvider = SampleData.createDelayingAsyncDataProvider (); final WebAsyncTree tree = new WebAsyncTree ( getStyleId (), dataProvider, new SampleTreeCellEditor () ); tree.setVisibleRowCount ( 8 ); final WebScrollPane treeScroll = new WebScrollPane ( tree ); treeScroll.setPreferredWidth ( 200 ); final WebTreeFilterField filterField = new WebTreeFilterField ( tree ); return CollectionUtils.asList ( new GroupPanel ( 8, false, filterField, treeScroll ) ); }
Example #26
Source File: WebTreeFilterFieldExample.java From weblaf with GNU General Public License v3.0 | 5 votes |
@NotNull @Override protected List<? extends JComponent> createPreviewElements () { final ExTreeDataProvider<SampleNode> dataProvider = SampleData.createExTreeDataProvider (); final WebExTree tree = new WebExTree ( getStyleId (), dataProvider, new SampleTreeCellEditor () ); tree.setVisibleRowCount ( 8 ); final WebScrollPane treeScroll = new WebScrollPane ( tree ); treeScroll.setPreferredWidth ( 200 ); final WebTreeFilterField filterField = new WebTreeFilterField ( tree ); return CollectionUtils.asList ( new GroupPanel ( 8, false, filterField, treeScroll ) ); }
Example #27
Source File: WebCheckBoxTreeExample.java From weblaf with GNU General Public License v3.0 | 5 votes |
@NotNull @Override protected List<? extends JComponent> createPreviewElements () { final WebTreeModel<SampleNode> model = SampleData.createCheckBoxTreeModel (); final WebCheckBoxTree tree = new WebCheckBoxTree ( getStyleId (), model ); tree.setVisibleRowCount ( 8 ); return CollectionUtils.asList ( new WebScrollPane ( tree ).setPreferredWidth ( 200 ) ); }
Example #28
Source File: WebFileTreeExample.java From weblaf with GNU General Public License v3.0 | 5 votes |
@NotNull @Override protected List<? extends JComponent> createPreviewElements () { final WebFileTree tree = new WebFileTree ( getStyleId (), FileUtils.getUserHome () ); tree.setEditable ( true ); tree.setVisibleRowCount ( 8 ); return CollectionUtils.asList ( new WebScrollPane ( tree ).setPreferredWidth ( 200 ) ); }
Example #29
Source File: WebFileTreeExample.java From weblaf with GNU General Public License v3.0 | 5 votes |
@NotNull @Override protected List<? extends JComponent> createPreviewElements () { final WebFileTree tree = new WebFileTree ( getStyleId () ); tree.setVisibleRowCount ( 8 ); return CollectionUtils.asList ( new WebScrollPane ( tree ).setPreferredWidth ( 200 ) ); }
Example #30
Source File: LanguageEditor.java From weblaf with GNU General Public License v3.0 | 5 votes |
public static void main ( final String[] args ) { WebLookAndFeel.install (); final LanguageEditor languageEditor = new LanguageEditor (); languageEditor.loadDictionary ( LanguageManager.getDictionaries () ); languageEditor.getDictionariesTree ().expandTillRecords (); languageEditor.getDictionariesTree ().setRootVisible ( false ); final WebScrollPane scroll = new WebScrollPane ( StyleId.scrollpaneUndecorated, languageEditor ); scroll.setPreferredSize ( 400, 600 ); TestFrame.show ( scroll ); }