`
whotodo
  • 浏览: 168633 次
文章分类
社区版块
存档分类
最新评论
文章列表
JFace Viewer允许你的不改变原始数据的前提下,将这些数据以List、Table、Tree等形式显示出来。 JFace Viewer的设计使用了适配器模式,而适配模式的核心思想是: 1。 不改造原有接口 2。 添加一个新的适配类来适配原有的接口 3。 让这个新的适配类提供满足客户需求的接口 类图如下: 举一个现实生活中的例子,你的笔记本电源适配器(Adapter)适配了提供220V电压的供电插座(Adaptee),从而为你的笔记本(Target)电源接口供电。和现实生活中Target只和Adapter打交道(笔记本只和电源适配器连接),它并不需要知道Adaptee的存在。 在JFace ...
创建一个Table的步骤如下: 1。 实例化Table,生成一张空表 2。 实例化TableColumn,添加列 3。 实例化TableItem,添加行 package org.vhow.swt.table; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Table; i ...
package org.vhow.java.filebroswer; import java.io.File; class FileBrowser { public void travse(File file) { if (file.isFile()) { // do something here System.out.println(file.getAbsolutePath()); } else if (file.isDirectory()) { File[] files = file.listFiles(); if (files != n ...
In terms of desktop development, anActivityis equivalent to a Form. It contens UI elements that display for you, and can respond to your actions. In AndroidManifest.xml, you have to let Android know the list of all the components that make up you application. You also have to tell the Android wha ...
Git is tool that can manage the version of your files for you. Use git to manage a local folder for you. In the artical, the local folder is /home/null/ManagedByGit, and the file in this folder is file.info. Before we you do anything, you should let git know who you are. git config --global user.nam ...
In GUI programming, there are two kinds of things we should do: I: Decide what kinds of widgets do we need and how to manipulate those widgets; II: Handle UI events to communicate with the users.
Check the installed plugins by default in different versions of eclipse: http://www.eclipse.org/downloads/packages/compare-packages Add triggers for "Content Assist" As we know, the "." is a trigger for content assist in eclipse by default. The way to add triggers is: "Window ...
LinearLayout和RelativeLayout共有属性:java代码中通过btn1关联次控件android:id="@+id/btn1"控件宽度android:layout_width="80px" <wbr><wbr><wbr> //"80dip"或"80dp"<br>android:layout_width =“wrap_content”<br>android:layout_width =“match_parent” <wbr>< ...
转自http://android.blog.51cto.com/268543/521784 BroadcastReceiver用于异步接收广播Intent。主要有两大类,用于接收广播的: 正常广播Normal broadcasts(用Context.sendBroadcast()发送)是完全异步的。它们都运行在一个未定义的顺序,通常是在同一时间。这样会更有效,但意味着receiver不能包含所要使用的结果或中止的API。 有序广播Ordered broadcasts(用
题目:某人先后在五家商店用光了身上所有的钱,在每家商店,他花掉的钱是他进入这家商店时身上所带钱数的一半再加一元钱。 问题:他在进第一家商店时身上带了多少钱? 分析:假设他进入某家商店时身上钱数为X,离开时身上钱数为Y。则 X - (X/2 + 1) = Y即: X = 2 * (Y + 1)现在已知离开第五家商店时Y == 0,则进入第五家商店时X = 2,这又恰好是他离开第四家商店时剩余的钱数...一次类推,可得到答案。 现在我们来用递归解决这个问题: 1. 递归出口:当他上身钱数为零时递归结束。 2. 迭代因子:将他进入的商店总数目作为这个递归的步进变量。 代码段如下: privat ...
1.首相要创建一个activity 代码如下: package com.wljie.layout.z; import android.app.Activity; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android. ...
绘制UML图http://argouml-downloads.tigris.org/ 例如: 绘制流程图http://projects.gnome.org/dia/ 例如: 绘制思维导图http://www.xmind.net/ 例如:
在面向对象的世界里,我们可以将对象拟人化。它们不仅拥有资源(数据),还能实现一些功能(方法)。Logger就是Java自带的,Android也支持的一个可以将log信息写到控制台或文件的log信息记录员。 package org.vhow.android; import java.io.IOException; import java.util.logging.ConsoleHandler; import java.util.logging.FileHandler; import java.util.logging.Level; import java.util.logging.Logger ...
除Classic版本的eclipse都内置了Marketplace 1. 点击eclipse “Help”菜单栏,打开Mraketplace 2. 搜索你需要的插件并安装 如果在Marketplace中没有你需要的包,就需要到第三方网站上下载对应的插件,以下是常用的插件: 1. Java Decompiler -- 阅读.class文件 http://java.decompiler.free.fr/ 2. Junit -- 对Java的代码进行单元测试(已集成于ecipse中) http://www.junit.org/ 3. Visual Swing for eclipse -- 可视化S ...
1. 开启“导入”对话框 2. 导入已存在项目到工作区 3. 勾选“Copy projects into workspace” 4. 点击“Finish” 在导入的过程中可能遇到这样的提示: 解决的方法是点击这个dialog的“OK”button,然后取消对basicProjectWithJar这个的勾选,继续导入 导入完成后,eclipse中就会出现所有Android Source Code中包含的项目:
Global site tag (gtag.js) - Google Analytics