neil
9 years ago
6 changed files with 82 additions and 50 deletions
@ -0,0 +1,17 @@ |
|||||||
|
package com.fr.grid; |
||||||
|
|
||||||
|
import com.fr.design.fun.impl.AbstractGridUIProcessor; |
||||||
|
|
||||||
|
import javax.swing.plaf.ComponentUI; |
||||||
|
|
||||||
|
/** |
||||||
|
* Created by Administrator on 2016/6/28/0028. |
||||||
|
*/ |
||||||
|
public class DefaultGridUIProcessor extends AbstractGridUIProcessor{ |
||||||
|
|
||||||
|
@Override |
||||||
|
public ComponentUI appearanceForGrid(int resolution) { |
||||||
|
return new GridUI(resolution); |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,23 @@ |
|||||||
|
package com.fr.design.fun; |
||||||
|
|
||||||
|
import com.fr.stable.fun.mark.Immutable; |
||||||
|
|
||||||
|
import javax.swing.plaf.ComponentUI; |
||||||
|
|
||||||
|
/** |
||||||
|
* 自定义单元格ui接口 |
||||||
|
* |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
public interface GridUIProcessor extends Immutable { |
||||||
|
|
||||||
|
String MARK_STRING = "GridUIProcessor"; |
||||||
|
int CURRENT_LEVEL = 1; |
||||||
|
|
||||||
|
/** |
||||||
|
* 自定义gridui, 用于实现一些自定义的格子绘制. |
||||||
|
* |
||||||
|
* @return 自定义gridui |
||||||
|
*/ |
||||||
|
ComponentUI appearanceForGrid(int paramInt); |
||||||
|
} |
@ -0,0 +1,15 @@ |
|||||||
|
package com.fr.design.fun.impl; |
||||||
|
|
||||||
|
import com.fr.design.fun.GridUIProcessor; |
||||||
|
import com.fr.stable.fun.mark.API; |
||||||
|
|
||||||
|
@API(level = GridUIProcessor.CURRENT_LEVEL) |
||||||
|
public abstract class AbstractGridUIProcessor implements GridUIProcessor { |
||||||
|
public int currentAPILevel() { |
||||||
|
return CURRENT_LEVEL; |
||||||
|
} |
||||||
|
|
||||||
|
public int layerIndex() { |
||||||
|
return DEFAULT_LAYER_INDEX; |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue