|
|
|
@ -309,6 +309,13 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
|
|
|
|
|
EventDispatcher.fire(JTemplateEvent.BEFORE_TEMPLATE_INIT, this); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 模板激活之前之前 |
|
|
|
|
*/ |
|
|
|
|
protected void beforeActive() { |
|
|
|
|
EventDispatcher.fire(JTemplateEvent.BEFORE_TEMPLATE_ACTIVE, this); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 模板关闭时 |
|
|
|
|
*/ |
|
|
|
@ -1085,6 +1092,7 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
|
|
|
|
|
* 激活指定的template |
|
|
|
|
*/ |
|
|
|
|
public void activeJTemplate(int index, JTemplate jt) { |
|
|
|
|
beforeActive(); |
|
|
|
|
DesignerContext.getDesignerFrame().activateJTemplate(this); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1092,7 +1100,7 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
|
|
|
|
|
* 激活已存在的模板 |
|
|
|
|
*/ |
|
|
|
|
public void activeOldJTemplate() { |
|
|
|
|
EventDispatcher.fire(JTemplateEvent.BEFORE_TEMPLATE_ACTIVE, this); |
|
|
|
|
beforeActive(); |
|
|
|
|
DesignerContext.getDesignerFrame().activateJTemplate(this); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1100,7 +1108,7 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
|
|
|
|
|
* 激活新的模板 |
|
|
|
|
*/ |
|
|
|
|
public void activeNewJTemplate() { |
|
|
|
|
EventDispatcher.fire(JTemplateEvent.BEFORE_TEMPLATE_ACTIVE, this); |
|
|
|
|
beforeActive(); |
|
|
|
|
DesignerContext.getDesignerFrame().addAndActivateJTemplate(this); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|