forked from fanruan/design
xiaoxia
8 years ago
10 changed files with 135 additions and 32 deletions
@ -0,0 +1,36 @@
|
||||
package com.fr.design.actions; |
||||
|
||||
import com.fr.design.mainframe.DesignerContext; |
||||
import com.fr.design.mainframe.ElementCasePane; |
||||
import com.fr.design.selection.SelectionEvent; |
||||
import com.fr.design.selection.SelectionListener; |
||||
import com.fr.grid.selection.CellSelection; |
||||
import com.fr.grid.selection.Selection; |
||||
|
||||
/** |
||||
* Created by daniel on 2016/10/10. |
||||
*/ |
||||
public abstract class SelectionListenerAction extends TemplateComponentAction<ElementCasePane> { |
||||
|
||||
protected SelectionListenerAction(ElementCasePane elementCasePane) { |
||||
super(elementCasePane); |
||||
} |
||||
|
||||
protected SelectionListener createSelectionListener () { |
||||
return new SelectionListener() { |
||||
|
||||
@Override |
||||
public void selectionChanged(SelectionEvent e) { |
||||
update(); |
||||
if (DesignerContext.getFormatState() != DesignerContext.FORMAT_STATE_NULL) { |
||||
Selection selection = getEditingComponent().getSelection(); |
||||
if (selection instanceof CellSelection) { |
||||
CellSelection cellselection = (CellSelection) selection; |
||||
//样式处理
|
||||
getEditingComponent().setCellNeedTOFormat(cellselection); |
||||
} |
||||
} |
||||
} |
||||
}; |
||||
} |
||||
} |
Loading…
Reference in new issue