亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? titleanddescexampler.java

?? 開源的關(guān)于SWT開發(fā)的圖形應(yīng)用庫(kù)
?? JAVA
字號(hào):
package com.swtplus.gallery;

import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.FontData;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.FontDialog;
import org.eclipse.swt.widgets.Label;

import com.swtplus.utility.Styler;
import com.swtplus.widgets.PListItem;
import com.swtplus.widgets.PCombo;
import com.swtplus.widgets.PGroup;
import com.swtplus.widgets.PList;
import com.swtplus.widgets.combo.ColorComboStrategy;
import com.swtplus.widgets.combo.NamedRGB;
import com.swtplus.widgets.group.SimpleGroupStrategy;
import com.swtplus.widgets.list.TitleAndDescListStrategy;

public class TitleAndDescExampler extends Composite implements IWidgetExampler {

	private Button single;
	private ColorComboStrategy foregroundComboStrat;
	private PCombo foregroundCombo;
	private ColorComboStrategy backgroundComboStrat;
	private PCombo backgroundCombo;
	protected Font font;
	private Composite exampleArea;
	private boolean firstCreate = true;
	
	private PList pList;
	private Color foreground;
	private Color background;
	private Label l;
	private PCombo selectionCombo;
	private ColorComboStrategy selectionComboStrat;
	private ColorComboStrategy selTextComboStrat;
	private PCombo selTextCombo;
	private Color selection;
	private Color selectionText;
	private Label l1;
	private Label l2;
	protected Font titleFont;
	private Button border;

	public TitleAndDescExampler(Composite c) {
		super(c, SWT.NONE);
		

		Styler colorStyler = new Styler();
		colorStyler.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
		
		Styler borderStyler = new Styler();
		borderStyler.setBorderColor(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW));
		
		SelectionListener sListener = new SelectionListener(){
			public void widgetSelected(SelectionEvent arg0) {
				recreate();
			}
			public void widgetDefaultSelected(SelectionEvent arg0) {
			}};
		
		
        this.setLayout(new FillLayout());
		final Composite container = new Composite (this,SWT.NONE);
		container.setBackground(c.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
		
		container.setLayout(new GridLayout());
		
		
		SimpleGroupStrategy sgs = new SimpleGroupStrategy(SWT.NONE);
		PGroup sgStyles = new PGroup(container,sgs);
		sgStyles.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
		sgStyles.setText("Styles");
		colorStyler.add(sgStyles);
		colorStyler.add(sgStyles.getBody());
		
		sgStyles.getBody().setLayout(new GridLayout());
		
		border = new Button(sgStyles.getBody(),SWT.CHECK | SWT.FLAT);
		border.setText("PList.BORDER");
		colorStyler.add(border);
		border.setSelection(true);
		border.addSelectionListener(sListener);
		
		single = new Button(sgStyles.getBody(),SWT.CHECK | SWT.FLAT);
		single.setText("PList.SINGLE");
		colorStyler.add(single);
		single.addSelectionListener(sListener);
		

		sgs = new SimpleGroupStrategy(SWT.NONE);
		PGroup sg = new PGroup(container,sgs);
		GridData gd = new GridData(GridData.FILL_HORIZONTAL);
		sg.setLayoutData(gd);
		sg.setText("Colors and Font");
		c = sg.getBody();
		GridLayout gl = new GridLayout();
		gl.numColumns = 2;
		c.setLayout(gl);
		colorStyler.add(sg);
		colorStyler.add(sg.getBody());
		
		Label colorForegroundLabel = new Label(c,SWT.NONE);
		colorForegroundLabel.setText("Foreground Color:");
		colorStyler.add(colorForegroundLabel);
		
		foregroundComboStrat = new ColorComboStrategy(ColorComboStrategy.SHOW_DEFAULT | ColorComboStrategy.SHOW_SWTPALETTE);
		foregroundCombo = new PCombo(c,PCombo.READ_ONLY | PCombo.FLAT,foregroundComboStrat);
		gd = new GridData(GridData.FILL_HORIZONTAL);
		foregroundCombo.setLayoutData(gd);
		borderStyler.add(foregroundCombo);

		Label backLabel = new Label(c,SWT.NONE);
		backLabel.setText("Background Color:");
		colorStyler.add(backLabel);
		
		backgroundComboStrat = new ColorComboStrategy(ColorComboStrategy.SHOW_DEFAULT | ColorComboStrategy.SHOW_SWTPALETTE);
		backgroundCombo = new PCombo(c,PCombo.READ_ONLY | PCombo.FLAT,backgroundComboStrat);
		gd = new GridData(GridData.FILL_HORIZONTAL);
		backgroundCombo.setLayoutData(gd);
		borderStyler.add(backgroundCombo);
		
		Label selectLabel = new Label(c,SWT.NONE);
		selectLabel.setText("Selection Color:");
		colorStyler.add(selectLabel);
		
		selectionComboStrat = new ColorComboStrategy(ColorComboStrategy.SHOW_DEFAULT | ColorComboStrategy.SHOW_SWTPALETTE);
		selectionCombo = new PCombo(c,PCombo.READ_ONLY | PCombo.FLAT,selectionComboStrat);
		gd = new GridData(GridData.FILL_HORIZONTAL);
		selectionCombo.setLayoutData(gd);
		borderStyler.add(selectionCombo);

		Label selTextLabel = new Label(c,SWT.NONE);
		selTextLabel.setText("Selection Text Color:");
		colorStyler.add(selTextLabel);
		
		selTextComboStrat = new ColorComboStrategy(ColorComboStrategy.SHOW_DEFAULT | ColorComboStrategy.SHOW_SWTPALETTE);
		selTextCombo = new PCombo(c,PCombo.READ_ONLY | PCombo.FLAT,selTextComboStrat);
		gd = new GridData(GridData.FILL_HORIZONTAL);
		selTextCombo.setLayoutData(gd);
		borderStyler.add(selTextCombo);
		
		
		Label l = new Label(c,SWT.NONE);
		l.setText("Font:");
		colorStyler.add(l);
		
		Button fontButton = new Button(c,SWT.PUSH | SWT.FLAT);
		fontButton.setText("Change Font...");
		fontButton.addSelectionListener(new SelectionListener(){
			public void widgetDefaultSelected(SelectionEvent arg0) {
			}
			public void widgetSelected(SelectionEvent arg0) {
				FontDialog fd = new FontDialog(Display.getCurrent().getActiveShell());
				FontData fds = fd.open();
				if (fds != null){
					if (font != null)
						font.dispose();
					
					font = new Font(Display.getCurrent(),fds);
					recreate();
				}
			}});
		
		Label titleLabel = new Label(c,SWT.NONE);
		titleLabel.setText("Title Font:");
		colorStyler.add(titleLabel);
		
		Button fontButton2 = new Button(c,SWT.PUSH | SWT.FLAT);
		fontButton2.setText("Change Font...");
		fontButton2.addSelectionListener(new SelectionListener(){
			public void widgetDefaultSelected(SelectionEvent arg0) {
			}
			public void widgetSelected(SelectionEvent arg0) {
				FontDialog fd = new FontDialog(Display.getCurrent().getActiveShell());
				FontData fds = fd.open();
				if (fds != null){
					if (titleFont != null)
						titleFont.dispose();
					
					titleFont = new Font(Display.getCurrent(),fds);
					recreate();
				}
			}});
		
		
		colorStyler.style();
		borderStyler.style();
		
		registerListeners(this);
	}

	public void setExampleArea(Composite area) {
		exampleArea = area;
		
		area.setLayout(new GridLayout(3,false));
		recreate();
		
		firstCreate = false;		
	}
	
	public void recreate(){
		
		if (pList != null){
			pList.dispose();
		}
		if (l != null){
			l.dispose();
		}	
		if (l2 != null){
			l2.dispose();
		}	
		if (l1 != null){
			l1.dispose();
		}	
		
		l1 = new Label(exampleArea,SWT.NONE);
		GridData gd = new GridData();
		gd.widthHint = 100;
		l1.setLayoutData(gd);
		
		int style = 0;
		
		TitleAndDescListStrategy strategy = new TitleAndDescListStrategy(style);
		
		
		if (foreground != null)
			foreground.dispose();
		if (background != null)
			background.dispose();
		
		style = SWT.NONE;
		if (border.getSelection())
			style = style | PList.BORDER;
		if (single.getSelection())
			style = style | PList.SINGLE;
		
		pList = new PList(exampleArea,style,strategy);
		
		l2 = new Label(exampleArea,SWT.NONE);
		gd = new GridData();
		gd.widthHint = 100;
		l2.setLayoutData(gd);

		if (firstCreate){
			foregroundComboStrat.setDefaultRGB(pList.getForeground().getRGB());
			foregroundCombo.setValue(new NamedRGB("Default",pList.getForeground().getRGB()));
			backgroundComboStrat.setDefaultRGB(pList.getBackground().getRGB());
			backgroundCombo.setValue(new NamedRGB("Default",pList.getBackground().getRGB()));

			selectionComboStrat.setDefaultRGB(pList.getSelectionColor().getRGB());
			selectionCombo.setValue(new NamedRGB("Default",pList.getSelectionColor().getRGB()));
			selTextComboStrat.setDefaultRGB(pList.getSelectionTextColor().getRGB());
			selTextCombo.setValue(new NamedRGB("Default",pList.getSelectionTextColor().getRGB()));

			font = null;
			titleFont = null;
		} else {
			foreground = new Color(Display.getCurrent(), ((NamedRGB)foregroundCombo.getValue()).getRGB());
			pList.setForeground(foreground);
			
			background = new Color(Display.getCurrent(), ((NamedRGB)backgroundCombo.getValue()).getRGB());
			pList.setBackground(background);
			
			selection = new Color(Display.getCurrent(), ((NamedRGB)selectionCombo.getValue()).getRGB());
			pList.setSelectionColor(selection);
			
			selectionText = new Color(Display.getCurrent(), ((NamedRGB)selTextCombo.getValue()).getRGB());
			pList.setSelectionTextColor(selectionText);
			
			if (font != null)
				pList.setFont(font);
			
			if (titleFont != null)
				strategy.setTitleFont(titleFont);
		}
		
		
		gd = new GridData(GridData.FILL_BOTH);
		gd.verticalIndent = 100;
		pList.setLayoutData(gd);
		
		l = new Label(exampleArea,SWT.NONE);
		gd = new GridData(SWT.CENTER,SWT.TOP,true,false);
		gd.horizontalSpan =3;
		gd.heightHint = 70;
		l.setLayoutData(gd);
		
		PListItem li = new PListItem(pList,SWT.NONE);
		li.setText("Example 1");
		li.setImage(GalleryImageRegistry.getImage(this.getClass(),"list4.png"));
		li.setData(TitleAndDescListStrategy.DESCRIPTION,"This is a description for the first example item");
		
		li = new PListItem(pList,SWT.NONE);
		li.setText("Example 2");
		li.setImage(GalleryImageRegistry.getImage(this.getClass(),"list2_small.png"));
		li.setData(TitleAndDescListStrategy.DESCRIPTION,"This is another desc for the second item in the list");
		
		li = new PListItem(pList,SWT.NONE);
		li.setText("Example 3");
		li.setImage(GalleryImageRegistry.getImage(this.getClass(),"list3.png"));
		li.setData(TitleAndDescListStrategy.DESCRIPTION,"3rd example description with a large string that will demonstrate the wrapping features of this list strategy");
		
		li = new PListItem(pList,SWT.NONE);
		li.setText("Example 4");
		li.setImage(GalleryImageRegistry.getImage(this.getClass(),"list4_small.png"));
		li.setData(TitleAndDescListStrategy.DESCRIPTION,"Description 4");

		li = new PListItem(pList,SWT.NONE);
		li.setText("Example 5");
		li.setImage(GalleryImageRegistry.getImage(this.getClass(),"list2.png"));
		li.setData(TitleAndDescListStrategy.DESCRIPTION,"This is the final description");
		
		exampleArea.layout();
	}

	public void registerListeners (Composite master){
		Control [] children = master.getChildren();
		for (int i = 0; i < children.length; i++) {
			Control child = children[i];
			if (child instanceof Composite){
				if (child instanceof Combo){
					Combo combo = (Combo) child;
					combo.addSelectionListener(new SelectionListener(){

						public void widgetSelected(SelectionEvent arg0) {
							//recreate();
						}

						public void widgetDefaultSelected(SelectionEvent arg0) {}
						
					});
				} else if (child instanceof PCombo){
					PCombo pCombo = (PCombo) child;
					pCombo.addModifyListener(new ModifyListener() {
						public void modifyText(ModifyEvent e) {
							recreate();
						}				
					});
				} else {
					registerListeners ((Composite) child);
				}
			}else if (child instanceof Button){
				Button button = (Button) child;
				button.addSelectionListener(new SelectionListener(){

					public void widgetSelected(SelectionEvent arg0) {
						recreate();
					}

					public void widgetDefaultSelected(SelectionEvent arg0) {}
					
				});
			}
		} 
	}

	public void dispose() {
		if (pList != null){
			pList.dispose();
		}
		if (l != null){
			l.dispose();
		}		
		if (l2 != null){
			l2.dispose();
		}	
		if (l1 != null){
			l1.dispose();
		}
		super.dispose();
	}
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一区二区三区av| 国产老女人精品毛片久久| 久久久久久免费毛片精品| 在线亚洲一区二区| 懂色av中文一区二区三区| 麻豆91在线播放免费| 日本欧美一区二区三区| 亚洲福中文字幕伊人影院| 亚洲一区二区三区不卡国产欧美| 亚洲成人免费电影| 日本免费在线视频不卡一不卡二| 日本亚洲电影天堂| 蜜桃av一区二区| 国产精品影视网| 成人久久视频在线观看| 91国偷自产一区二区三区成为亚洲经典 | 欧美日韩精品福利| 91精品国产免费| 久久综合九色综合欧美就去吻| 精品国产免费人成电影在线观看四季 | 日韩午夜激情免费电影| 精品欧美久久久| 国产精品成人网| 午夜免费欧美电影| 狠狠网亚洲精品| www.亚洲在线| 欧美人妖巨大在线| 久久精品人人做人人综合| 亚洲欧洲av色图| 日韩激情视频在线观看| 国产寡妇亲子伦一区二区| 99久久精品费精品国产一区二区| 色天天综合色天天久久| 日韩免费看的电影| 成人免费视频在线观看| 亚洲丝袜精品丝袜在线| 日韩成人午夜电影| 99天天综合性| 日韩精品一区二区三区视频在线观看| 中文字幕欧美国产| 日精品一区二区三区| 国产最新精品免费| 欧美日韩中文精品| 中文字幕免费不卡在线| 奇米色777欧美一区二区| av电影在线观看完整版一区二区| 日韩欧美国产综合一区| 亚洲欧美日韩中文播放| 精品一区二区三区免费视频| 在线看不卡av| 中文字幕日韩一区| 国产综合久久久久影院| 欧美喷水一区二区| 亚洲欧美一区二区三区极速播放 | 自拍视频在线观看一区二区| 久久精品国产99国产| 欧美日韩你懂得| 亚洲日本丝袜连裤袜办公室| 国产裸体歌舞团一区二区| 欧美另类一区二区三区| 亚洲日本va午夜在线影院| 国产宾馆实践打屁股91| 26uuu另类欧美亚洲曰本| 亚洲国产va精品久久久不卡综合 | 亚洲福利国产精品| 91偷拍与自偷拍精品| 亚洲国产成人私人影院tom| 国产一区二区免费视频| 欧美电影免费观看高清完整版在 | 在线一区二区三区四区五区| 国产精品久久久久影院亚瑟| 国产精品羞羞答答xxdd| 久久无码av三级| 国产精品综合二区| 久久久综合视频| 国产成人夜色高潮福利影视| 精品久久久久一区| 国产一区二区三区在线观看免费视频 | 成人v精品蜜桃久久一区| 久久综合久久99| 国产精品电影一区二区| 一区二区三区中文字幕精品精品| 激情五月播播久久久精品| 欧美不卡一区二区| 国产一区二区美女诱惑| xnxx国产精品| 国产成人精品亚洲日本在线桃色| 久久精品人人做人人综合| 成人av集中营| 亚洲一二三区不卡| 欧美一区二区女人| 国产精选一区二区三区| 国产精品国产馆在线真实露脸 | 51久久夜色精品国产麻豆| 天堂蜜桃91精品| ww久久中文字幕| 99久久久久久| 午夜精品久久久久久久久久| 精品日韩一区二区三区| 从欧美一区二区三区| 一区二区激情小说| 精品国产精品网麻豆系列| 成人av在线电影| 五月天亚洲婷婷| 欧美激情一二三区| 欧美色图激情小说| 国产精品夜夜嗨| 亚洲午夜免费视频| 国产色产综合色产在线视频| 在线观看一区不卡| 精品一区二区三区免费观看| 亚洲人妖av一区二区| 91麻豆精品国产| 91丨porny丨中文| 久久99九九99精品| 一区二区三区四区五区视频在线观看 | 亚洲伦理在线免费看| 日韩欧美不卡一区| 色哟哟欧美精品| 国产精品中文欧美| 日韩高清国产一区在线| 亚洲欧洲综合另类在线| 久久蜜桃av一区二区天堂| 欧美在线视频日韩| 不卡一区二区在线| 国产尤物一区二区| 日韩精品一二三区| 一级精品视频在线观看宜春院| 国产日韩欧美a| 精品精品国产高清a毛片牛牛| 91成人免费网站| 91在线视频免费观看| 丰满岳乱妇一区二区三区| 麻豆成人免费电影| 日韩成人一级大片| 首页综合国产亚洲丝袜| 一区二区三区在线观看网站| 日本一区二区三区四区| 久久久国产精品麻豆| 日韩欧美精品三级| 日韩一区和二区| 欧美一区二区视频在线观看2022| 色999日韩国产欧美一区二区| av爱爱亚洲一区| 成人的网站免费观看| 成人免费看视频| 成人午夜视频在线| 成人aa视频在线观看| 国产v综合v亚洲欧| 成人一道本在线| 高清日韩电视剧大全免费| 国产电影一区二区三区| 国产在线观看免费一区| 精品一区二区在线视频| 国产一区不卡在线| 国产精品资源在线观看| 国产成人自拍在线| 懂色av一区二区三区免费看| 成人国产精品免费网站| 9i在线看片成人免费| 欧洲av一区二区嗯嗯嗯啊| 欧美中文字幕亚洲一区二区va在线 | 宅男在线国产精品| 日韩一级黄色大片| 精品国产一区二区在线观看| 久久美女艺术照精彩视频福利播放 | 国内精品免费**视频| 成人午夜电影小说| 99精品视频中文字幕| 欧美综合一区二区三区| 91精品欧美一区二区三区综合在| 精品少妇一区二区三区免费观看 | 在线观看欧美精品| 欧美日韩精品一区视频| 欧美一区二区不卡视频| 国产亚洲精品aa午夜观看| 亚洲欧洲综合另类| 蜜乳av一区二区| 国产99久久久国产精品潘金网站| 91网站在线播放| 欧美一区二区三区电影| 国产精品欧美经典| 亚洲不卡一区二区三区| 国产九九视频一区二区三区| 色88888久久久久久影院按摩| 日韩一区二区视频| 中文字幕第一区二区| 日日嗨av一区二区三区四区| 国产成人午夜精品5599| 欧美日韩一区三区| 日本一区二区三区久久久久久久久不| 一区二区三区四区不卡在线| 精品一二三四在线| 91黄视频在线| 中文字幕成人av| 日韩高清中文字幕一区| 91网站最新网址| 国产丝袜欧美中文另类| 日韩精品国产欧美| 色婷婷亚洲精品|