|
|
|
@ -5,6 +5,7 @@ import java.awt.event.ActionEvent;
|
|
|
|
|
import java.awt.event.ActionListener; |
|
|
|
|
import java.awt.event.ComponentAdapter; |
|
|
|
|
import java.awt.event.ComponentEvent; |
|
|
|
|
import java.awt.event.ComponentListener; |
|
|
|
|
import java.awt.event.MouseEvent; |
|
|
|
|
import java.awt.event.MouseListener; |
|
|
|
|
import java.awt.event.MouseMotionListener; |
|
|
|
@ -27,6 +28,7 @@ import com.fr.base.vcs.DesignerMode;
|
|
|
|
|
import com.fr.design.actions.UpdateAction; |
|
|
|
|
import com.fr.design.constants.UIConstants; |
|
|
|
|
import com.fr.design.dialog.FineJOptionPane; |
|
|
|
|
import com.fr.design.event.RemoveListener; |
|
|
|
|
import com.fr.design.file.HistoryTemplateListCache; |
|
|
|
|
import com.fr.design.gui.ibutton.UIButton; |
|
|
|
|
import com.fr.design.gui.ibutton.UIButtonUI; |
|
|
|
@ -44,7 +46,6 @@ import com.fr.poly.PolyDesigner;
|
|
|
|
|
import com.fr.report.poly.PolyWorkSheet; |
|
|
|
|
import com.fr.report.report.TemplateReport; |
|
|
|
|
import com.fr.report.worksheet.WorkSheet; |
|
|
|
|
import com.fr.stable.ProductConstants; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* NameTabPane of sheets |
|
|
|
@ -52,7 +53,7 @@ import com.fr.stable.ProductConstants;
|
|
|
|
|
* @editor zhou |
|
|
|
|
* @since 2012-3-26下午1:45:53 |
|
|
|
|
*/ |
|
|
|
|
public class SheetNameTabPane extends JComponent implements MouseListener, MouseMotionListener { |
|
|
|
|
public class SheetNameTabPane extends JComponent implements MouseListener, MouseMotionListener, RemoveListener { |
|
|
|
|
|
|
|
|
|
private static final Color LINE_COLOR = new Color(0xababab); |
|
|
|
|
|
|
|
|
@ -140,6 +141,10 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
|
|
|
|
|
|
|
|
|
|
private boolean isAuthorityEditing = false; |
|
|
|
|
|
|
|
|
|
private ComponentListener listener; |
|
|
|
|
|
|
|
|
|
private DesignerFrame designerFrame; |
|
|
|
|
|
|
|
|
|
public SheetNameTabPane(ReportComponentComposite reportCompositeX) { |
|
|
|
|
this.reportComposite = reportCompositeX; |
|
|
|
|
this.setLayout(new BorderLayout(0, 0)); |
|
|
|
@ -203,14 +208,20 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
DesignerContext.getDesignerFrame().addComponentListener(new ComponentAdapter(){ |
|
|
|
|
listener = new ComponentAdapter(){ |
|
|
|
|
@Override public void componentResized(ComponentEvent e) { |
|
|
|
|
for (int i = 0; i < lastOneIndex * NUM; i++) { |
|
|
|
|
moveLeft(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
designerFrame = DesignerContext.getDesignerFrame(); |
|
|
|
|
designerFrame.addComponentListener(listener); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void doRemoveAction() { |
|
|
|
|
designerFrame.removeComponentListener(listener); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private ActionListener createLeftButtonActionListener() { |
|
|
|
|