本文整理汇总了Java中com.alee.laf.scroll.WebScrollPane类的典型用法代码示例。如果您正苦于以下问题:Java WebScrollPane类的具体用法?Java WebScrollPane怎么用?Java WebScrollPane使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WebScrollPane类属于com.alee.laf.scroll包,在下文中一共展示了WebScrollPane类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: RelationTypeTestsPanel
import com.alee.laf.scroll.WebScrollPane; //导入依赖的package包/类
public RelationTypeTestsPanel() {
setBorder(new TitledBorder(new LineBorder(new Color(184, 207, 229)), "Relation tests", TitledBorder.LEADING,
TitledBorder.TOP, null, new Color(51, 51, 51)));
setLayout(new BorderLayout());
tests = new WebList();
MButtonPanel buttonsPanel = new MButtonPanel(moveUpButton, moveDownButton,
addButton, editButton, removeButton)
.withVerticalLayout()
.withAllButtonsEnabled(true)
.withMargin(10);
add(new WebScrollPane(tests), BorderLayout.CENTER);
add(buttonsPanel, BorderLayout.EAST);
}
开发者ID:CLARIN-PL,项目名称:WordnetLoom,代码行数:19,代码来源:RelationTypeTestsPanel.java
示例2: init
import com.alee.laf.scroll.WebScrollPane; //导入依赖的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
示例3: init
import com.alee.laf.scroll.WebScrollPane; //导入依赖的package包/类
private void init() {
setBorder(new TitledBorder(new LineBorder(new Color(184, 207, 229)), "Relation properties", TitledBorder.LEADING,
TitledBorder.TOP, null, new Color(51, 51, 51)));
WebScrollPane descriptionScrollWrapper = new WebScrollPane(relationDescription);
setLayout(new RiverLayout());
colorChooser.setPipetteEnabled(false);
colorChooser.setFieldType(ColorChooserFieldType.hex);
add(LINE_BREAK + " " + RIGHT, nameLabel);
add(TAB_FILL, relationName);
add(LINE_BREAK, displayLabel);
add(TAB_FILL, relationDisplay);
add(LINE_BREAK, shortcutLabel);
add(TAB_FILL, relationShortcut);
add(LINE_BREAK, descriptionLabel);
add(TAB_FILL, descriptionScrollWrapper);
add(LINE_BREAK, lexiconLabel);
add(TAB_FILL, lexicon);
add(RIGHT, lexiconBtn);
add(LINE_BREAK, multilingualLabel);
add(TAB_FILL, multilingual);
add(LINE_BREAK, posLabel);
add(TAB_FILL, allowedPartsOfSpeech);
add(RIGHT, showAllowedPartsOfSpeechBtn);
add(LINE_BREAK, reverseLabel);
add(TAB_FILL, reverseRelation);
add(RIGHT, reverseRelationBtn);
add(LINE_BREAK, colorLabel);
add(TAB_FILL, colorChooser);
add(LINE_BREAK, directionLabel);
add(TAB_FILL, relationDirection);
add(RiverLayout.LINE_BREAK + " " + RiverLayout.CENTER, btnSave);
}
开发者ID:CLARIN-PL,项目名称:WordnetLoom,代码行数:37,代码来源:RelationTypePropertiesPanel.java
示例4: main
import com.alee.laf.scroll.WebScrollPane; //导入依赖的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
示例5: CenterPanel
import com.alee.laf.scroll.WebScrollPane; //导入依赖的package包/类
public CenterPanel() {
super(HORIZONTAL_SPLIT);
WebScrollPane leftScrollPane = new WebScrollPane(createTree());
mediaListPanel = new MediaListPanel();
WebScrollPane rightScrollPane = new WebScrollPane(mediaListPanel);
this.setLeftComponent(leftScrollPane);
this.setRightComponent(rightScrollPane);
}
开发者ID:DiscoElevator,项目名称:MyMediaList,代码行数:9,代码来源:CenterPanel.java
示例6: MediaListPanel
import com.alee.laf.scroll.WebScrollPane; //导入依赖的package包/类
public MediaListPanel(List<MediaListItem> items) {
super();
this.setLayout(new BorderLayout());
if ((items != null) && !items.isEmpty()) {
mediaTable = createTable(items);
this.add(new WebScrollPane(mediaTable), BorderLayout.NORTH);
}
}
开发者ID:DiscoElevator,项目名称:MyMediaList,代码行数:9,代码来源:MediaListPanel.java
示例7: createRightPanel
import com.alee.laf.scroll.WebScrollPane; //导入依赖的package包/类
public void createRightPanel(List<MediaListItem> items) {
mediaListPanel = new MediaListPanel(items);
WebScrollPane scrollPane = new WebScrollPane(mediaListPanel);
scrollPane.getVerticalScrollBar().setUnitIncrement(5); // TODO config
this.setRightComponent(scrollPane);
}
开发者ID:DiscoElevator,项目名称:MyMediaList,代码行数:7,代码来源:CenterPanel.java
示例8: createListPanel
import com.alee.laf.scroll.WebScrollPane; //导入依赖的package包/类
private static WebPanel createListPanel(final WebTable list,
String overlayText,
WebToggleButton button) {
// overlay for empty list
WebOverlay listOverlay = new WebOverlay(list);
listOverlay.setOverlayMargin(20);
final WebTextArea overlayArea = new WebTextArea();
overlayArea.setText(overlayText);
overlayArea.setLineWrap(true);
overlayArea.setWrapStyleWord(true);
overlayArea.setMargin(View.MARGIN_DEFAULT);
overlayArea.setFontSize(View.FONT_SIZE_BIG);
overlayArea.setEditable(false);
BorderPainter<WebTextArea> borderPainter = new BorderPainter<>(Color.LIGHT_GRAY);
borderPainter.setRound(15);
overlayArea.setPainter(borderPainter);
list.getModel().addTableModelListener(new TableModelListener() {
@Override
public void tableChanged(TableModelEvent e) {
overlayArea.setVisible(list.getModel().getRowCount() == 0);
}
});
overlayArea.setVisible(list.getModel().getRowCount() == 0);
listOverlay.addOverlay(overlayArea, SwingConstants.CENTER, SwingConstants.CENTER);
WebScrollPane scrollPane = new ComponentUtils.ScrollPane(listOverlay);
scrollPane.setDrawBorder(false);
// button as overlay
button.setOpaque(false);
button.setUndecorated(true);
WebOverlay chatListOverlay = new WebOverlay(scrollPane,
button, SwingConstants.TRAILING, SwingConstants.BOTTOM);
chatListOverlay.setOverlayMargin(0, 0, View.GAP_BIG, View.GAP_BIG + SCROLL_BAR_WIDTH);
// fixing overlay button paint bug on startup, dont wanna know whats happening here
SwingUtils.delayInvokeLater(0, new Runnable() {
@Override
public void run() {
TooltipManager.showOneTimeTooltip(list, new Point(1,1), "");
}
});
return chatListOverlay;
}
开发者ID:kontalk,项目名称:desktopclient-java,代码行数:45,代码来源:MainFrame.java
示例9: showException
import com.alee.laf.scroll.WebScrollPane; //导入依赖的package包/类
public static void showException(String title, Exception e, String msg2)
{
WebDialog dialog = new WebDialog(Spade.main.gui.frame, title);
dialog.setModal(true);
WebTextArea text = new WebTextArea();
text.setEditable(false);
text.setWrapStyleWord(true);
text.setLineWrap(true);
text.setFontName(Font.MONOSPACED);
StringWriter msg = new StringWriter();
e.printStackTrace(new PrintWriter(msg));
text.append(msg.toString());
JPanel panel = (JPanel) dialog.getContentPane();
panel.setLayout(new BorderLayout());
panel.setPreferredSize(new Dimension(800, 400));
WebScrollPane scroll = new WebScrollPane(text);
panel.add(new WebLabel("An Exception Occured: ").setMargin(5), BorderLayout.NORTH);
panel.add(scroll, BorderLayout.CENTER);
WebPanel bottom = new WebPanel();
bottom.setLayout(new BorderLayout());
WebTextArea report =
new WebTextArea("Please copy the above message and report it to " + Spade.REPO_URL
+ " along with details of what you were doing when it happened.");
report.setLineWrap(true);
report.setWrapStyleWord(true);
report.setEditable(false);
report.setMargin(5);
WebTextArea endMsg = new WebTextArea(msg2);
endMsg.setLineWrap(true);
endMsg.setWrapStyleWord(true);
endMsg.setEditable(false);
endMsg.setMargin(5);
bottom.add(report, BorderLayout.NORTH);
bottom.add(endMsg, BorderLayout.CENTER);
panel.add(bottom, BorderLayout.SOUTH);
dialog.pack();
dialog.setResizable(true);
dialog.setVisible(true);
dialog.setLocationRelativeTo(Spade.main.gui.frame);
}
开发者ID:Spade-Editor,项目名称:Spade,代码行数:53,代码来源:Popup.java
注:本文中的com.alee.laf.scroll.WebScrollPane类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论