Java Code Examples for net.miginfocom.layout.LC#insetsAll()
The following examples show how to use
net.miginfocom.layout.LC#insetsAll() .
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: DesktopFilter.java From cuba with Apache License 2.0 | 6 votes |
public DesktopFilter() { delegate = AppBeans.get(FilterDelegate.class); delegate.setFilter(this); LC topLc = new LC(); topLc.hideMode(3); topLc.insetsAll("0"); if (LayoutAdapter.isDebug()) { topLc.debug(1000); } MigLayout topLayout = new MigLayout(topLc); impl = new JPanel(topLayout); ComponentContainer layout = delegate.getLayout(); JComponent unwrap = DesktopComponentsHelper.getComposition(layout); impl.add(unwrap, "width 100%"); setWidth("100%"); delegate.setExpandedStateChangeListener(e -> fireExpandStateChange(e.isExpanded())); delegate.setCaptionChangedListener(this::updateCaption); }
Example 2
Source File: DesktopRowsCount.java From cuba with Apache License 2.0 | 5 votes |
public RowsCountComponent() { LC lc = new LC(); lc.hideMode(2); lc.insetsAll("2"); layout = new MigLayout(lc); if (LayoutAdapter.isDebug()) { lc.debug(1000); } setLayout(layout); firstButton = new JButton("<<"); add(firstButton); firstButton.setPreferredSize(size); firstButton.setMinimumSize(size); prevButton = new JButton("<"); add(prevButton); prevButton.setPreferredSize(size); prevButton.setMinimumSize(size); label = new JLabel(); label.setMinimumSize(size); add(label); countButton = new JXHyperlink(); countButton.setText("[?]"); add(countButton); nextButton = new JButton(">"); add(nextButton); nextButton.setPreferredSize(size); nextButton.setMinimumSize(size); lastButton = new JButton(">>"); add(lastButton); lastButton.setPreferredSize(size); lastButton.setMinimumSize(size); }