当前位置: 首页>>代码示例>>Java>>正文


Java WebButton类代码示例

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


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

示例1: ProgressCellRenderer

import com.alee.laf.button.WebButton; //导入依赖的package包/类
public ProgressCellRenderer() {
	label = new WebLabel();
	incButton = new WebButton("+");
	incButton.setPreferredSize(new Dimension(30, 10));
	incButton.addActionListener(new ActionListener() {

		@Override
		public void actionPerformed(ActionEvent e) {
			System.out.println("tralala");
		}
	});
	decButton = new WebButton("-");
	decButton.setPreferredSize(new Dimension(30, 10));
	setLayout(new BorderLayout());
	add(incButton, BorderLayout.WEST);
	add(label, BorderLayout.CENTER);
	add(decButton, BorderLayout.EAST);
}
 
开发者ID:DiscoElevator,项目名称:MyMediaList,代码行数:19,代码来源:ProgressCellRenderer.java

示例2: ExamplePanel

import com.alee.laf.button.WebButton; //导入依赖的package包/类
public ExamplePanel() {
    setLayout(new FormLayout(new ColumnSpec[]{
            ColumnSpec.decode("450px"),},
            new RowSpec[]{
                    RowSpec.createGap(LayoutStyle.getCurrent().getRelatedComponentsPadY()),
                    new RowSpec(Sizes.DEFAULT),
                    RowSpec.createGap(LayoutStyle.getCurrent().getRelatedComponentsPadY()),
                    RowSpec.decode("fill:max(65dlu;default):grow"),
                    RowSpec.createGap(LayoutStyle.getCurrent().getRelatedComponentsPadY()),
                    new RowSpec(Sizes.DEFAULT),}));

    JLabel lblNewLabel = new JLabel(Labels.USE_CASE_COLON);
    add(lblNewLabel, "1, 2, fill, fill");

    JScrollPane scrollPane = new JScrollPane();
    add(scrollPane, "1, 4, fill, fill");

    exampleTextArea = new WebTextArea();
    exampleTextArea.setLineWrap(true);
    scrollPane.setViewportView(exampleTextArea);

    Box horizontalBox = Box.createHorizontalBox();
    add(horizontalBox, "1, 6, right, default");

    btnSave = new WebButton(Labels.ADD);
    btnSave.setHorizontalAlignment(SwingConstants.RIGHT);
    horizontalBox.add(btnSave);

    Component horizontalStrut = Box.createHorizontalStrut(10);
    horizontalBox.add(horizontalStrut);

    btnCancel = new WebButton(Labels.CANCEL);
    btnCancel.setHorizontalAlignment(SwingConstants.RIGHT);
    horizontalBox.add(btnCancel);

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

示例3: StatusChangeListener

import com.alee.laf.button.WebButton; //导入依赖的package包/类
public StatusChangeListener(WebSpinner maxEpisodes, WebSpinner episodesWatched,
		WebDateField startDate, WebDateField endDate, WebButton[] clearButtons) {
	this.maxEpisodes = maxEpisodes;
	this.episodesWatched = episodesWatched;
	this.startDate = startDate;
	this.endDate = endDate;
	this.clearButtons = clearButtons;
}
 
开发者ID:DiscoElevator,项目名称:MyMediaList,代码行数:9,代码来源:StatusChangeListener.java

示例4: EditItemForm

import com.alee.laf.button.WebButton; //导入依赖的package包/类
public EditItemForm() {
		super();
		originalNameTextField = new WebTextField();
//		originalNameTextField.setMinimumWidth(100);
		localizedNameTextField = new WebTextField();
//		localizedNameTextField.setMinimumWidth(100);
		countryComboBox = new WebComboBox(getCountries());
		typeComboBox = new WebComboBox(MediaType.values());
		statusComboBox = new WebComboBox(MediaStatus.values());
		maxEpisodes = new WebSpinner(new SpinnerNumberModel(1, 1, 999, 1));
		episodesWatched = new WebSpinner(new SpinnerNumberModel(0, 0, 1, 1));
		startDate = new WebDateField();
		endDate = new WebDateField();
		WebButton startDateClearButton = new WebButton("Clear", new ClearDateActionListener(startDate));
		WebButton endDateClearButton = new WebButton("Clear", new ClearDateActionListener(endDate));
		statusComboBox.addActionListener(new StatusChangeListener(maxEpisodes, episodesWatched,
				startDate, endDate, new WebButton[]{startDateClearButton, endDateClearButton}));
		maxEpisodes.addChangeListener(new MaxEpisodesChangeListener(episodesWatched, statusComboBox));
		statusComboBox.setSelectedIndex(0); // fires initial notification
		setModal(true);
		setResizable(false);
		setMinimumSize(new Dimension(500, 400));
		setLayout(new BorderLayout(5, 5));
		WebPanel panel = new WebPanel();
		panel.setLayout(createLayout());
		panel.setMargin(5, 5, 5, 5);
		panel.add(new WebLabel(AppSettings.getLocalizedString("editForm.fields.originalName")), "0,0");
		panel.add(originalNameTextField, "1,0,3,0");
		panel.add(new WebLabel(AppSettings.getLocalizedString("editForm.fields.localizedName")), "0,1");
		panel.add(localizedNameTextField, "1,1,3,1");
		panel.add(new WebLabel(AppSettings.getLocalizedString("editForm.fields.country")), "0,2");
		panel.add(countryComboBox, "1,2,3,2");
		panel.add(new WebLabel(AppSettings.getLocalizedString("editForm.fields.type")), "0,3");
		panel.add(typeComboBox, "1,3,3,3");
		panel.add(new WebLabel(AppSettings.getLocalizedString("editForm.fields.status")), "0,4");
		panel.add(statusComboBox, "1,4,3,4");
		panel.add(new WebLabel(AppSettings.getLocalizedString("editForm.fields.progress")), "0,5");
		panel.add(episodesWatched, "1,5");
		panel.add(new WebLabel("/"), "2,5");
		panel.add(maxEpisodes, "3,5");
		panel.add(new WebLabel("startDate"), "0,6");
		panel.add(startDate, "1,6");
		panel.add(startDateClearButton, "3,6");
		panel.add(new WebLabel("endDate"), "0,7");
		panel.add(endDate, "1,7");
		panel.add(endDateClearButton, "3,7");
//		panel.setLayout(new FormLayout(false, true));
//		panel.setMargin(5, 5, 5, 5);
//		panel.add(new WebLabel("nameOrig"), FormLayout.LEFT);
//		panel.add(nameOrigTextField, FormLayout.RIGHT);
//		panel.add(new WebLabel("country"), FormLayout.LEFT);
//		panel.add(countryTextField, FormLayout.RIGHT);
//		panel.add(new WebLabel("type"), FormLayout.LEFT);
//		panel.add(typeComboBox, FormLayout.RIGHT);
//		panel.add(new WebLabel("status"), FormLayout.LEFT);
//		panel.add(statusComboBox, FormLayout.RIGHT);
		add(panel, BorderLayout.NORTH);
		add(createSaveButton(), BorderLayout.SOUTH);
		setTitle(AppSettings.getLocalizedString("editForm.title"));
	}
 
开发者ID:DiscoElevator,项目名称:MyMediaList,代码行数:61,代码来源:EditItemForm.java

示例5: disableClearButtons

import com.alee.laf.button.WebButton; //导入依赖的package包/类
private void disableClearButtons() {
	for (WebButton button : clearButtons) {
		button.setEnabled(false);
	}
}
 
开发者ID:DiscoElevator,项目名称:MyMediaList,代码行数:6,代码来源:StatusChangeListener.java

示例6: enableClearButtons

import com.alee.laf.button.WebButton; //导入依赖的package包/类
private void enableClearButtons() {
	for (WebButton button : clearButtons) {
		button.setEnabled(true);
	}
}
 
开发者ID:DiscoElevator,项目名称:MyMediaList,代码行数:6,代码来源:StatusChangeListener.java

示例7: createButton

import com.alee.laf.button.WebButton; //导入依赖的package包/类
public static JButton createButton(String text)
{
	WebButton c = new WebButton(text);
	return c;
}
 
开发者ID:Spade-Editor,项目名称:Spade,代码行数:6,代码来源:WeblafWrapper.java

示例8: getChooseButton

import com.alee.laf.button.WebButton; //导入依赖的package包/类
public WebButton getChooseButton ()
{
    return chooseButton;
}
 
开发者ID:DiegoArranzGarcia,项目名称:JavaTracer,代码行数:5,代码来源:WebFileChooserField.java


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