You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.7 KiB
60 lines
1.7 KiB
/* |
|
* Copyright (C), 2018-2021 |
|
* Project: starter |
|
* FileName: WechatQueryPane |
|
* Author: fr.open |
|
* Date: 2021/12/14 15:32 |
|
*/ |
|
package com.fr.plugin.icjb.ui; |
|
|
|
import com.fanruan.api.design.DesignKit; |
|
import com.fanruan.api.design.ui.component.UIButtonGroup; |
|
import com.fanruan.api.design.ui.component.UILabel; |
|
import com.fanruan.api.design.ui.container.BasicPane; |
|
import com.fanruan.api.design.ui.layout.TableLayoutKit; |
|
|
|
import java.awt.*; |
|
|
|
/** |
|
* <Function Description><br> |
|
* <WebQueryPane> |
|
* |
|
* @author fr.open |
|
* @since 1.0.0 |
|
*/ |
|
public class WebQueryPane extends BasicPane { |
|
public static final String[] SEARCH_OPTIONS = new String[]{ |
|
DesignKit.i18nText("Plugin-icjb_Search_User"), |
|
DesignKit.i18nText("Plugin-icjb_Search_Department") |
|
}; |
|
private UIButtonGroup searchType; |
|
|
|
public WebQueryPane() { |
|
setLayout(new BorderLayout()); |
|
searchType = new UIButtonGroup<String[]>(SEARCH_OPTIONS); |
|
searchType.setSelectedIndex(0); |
|
Component[][] coms = new Component[][]{ |
|
{new UILabel(DesignKit.i18nText("Plugin-icjb_Search_Type") + ":"), searchType} |
|
}; |
|
|
|
double p = TableLayoutKit.PREFERRED; |
|
double f = TableLayoutKit.FILL; |
|
double[] rowSize = {p}; |
|
double[] columnSize = {p, f}; |
|
|
|
add(TableLayoutKit.createTableLayoutPane(coms, rowSize, columnSize)); |
|
} |
|
|
|
@Override |
|
protected String title4PopupWindow() { |
|
return DesignKit.i18nText("Plugin-icjb_Query"); |
|
} |
|
|
|
public int getSearchType() { |
|
return searchType.getSelectedIndex(); |
|
} |
|
|
|
public void setSearchType(int searchType) { |
|
this.searchType.setSelectedIndex(searchType); |
|
} |
|
} |