mirror of
https://gitee.com/openharmony/developtools_profiler
synced 2024-11-23 06:50:12 +00:00
commit
237b504d1e
@ -119,58 +119,12 @@ public class DistributedDataPane extends JBPanel {
|
||||
private class MyTabPanel extends JBTabbedPane implements MouseListener {
|
||||
private Rectangle setting = new Rectangle();
|
||||
private Rectangle cancel = new Rectangle();
|
||||
// private Point startPoint;
|
||||
// private Point endPoint;
|
||||
// private Rectangle srcBounds;
|
||||
|
||||
/**
|
||||
* MyTabPanel
|
||||
*/
|
||||
public MyTabPanel() {
|
||||
addMouseListener(this);
|
||||
// addMouseMotionListener(new MouseMotionListener() {
|
||||
// @Override
|
||||
// public void mouseDragged(MouseEvent event) {
|
||||
// if (getCursor().getType() == Cursor.N_RESIZE_CURSOR) {
|
||||
// endPoint = SwingUtilities.convertPoint(MyTabPanel.this, event.getPoint(),
|
||||
// MyTabPanel.this.getRootPane().getLayeredPane());
|
||||
// int yPosition = Utils.getY(endPoint) - Utils.getY(startPoint);
|
||||
// if (srcBounds.height - yPosition < barHeight) {
|
||||
// return;
|
||||
// } else if (srcBounds.height - yPosition
|
||||
// > MyTabPanel.this.getRootPane().getLayeredPane().getHeight() - barHeight) {
|
||||
// return;
|
||||
// } else {
|
||||
// DistributedDataPane.this.setBounds(Utils.getX(srcBounds),
|
||||
// Utils.getY(srcBounds) + yPosition,
|
||||
// srcBounds.width,
|
||||
// srcBounds.height - yPosition);
|
||||
// DistributedDataPane.this.revalidate();
|
||||
// if (boundsChangeListener != null) {
|
||||
// boundsChangeListener.consume(DistributedDataPane.this.getBounds());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void mouseMoved(MouseEvent event) {
|
||||
// int xNum = 0;
|
||||
// if (getTabCount() > 0) {
|
||||
// Rectangle rect = getUI().getTabBounds(MyTabPanel.this, getTabCount() - 1);
|
||||
// xNum = rect.width + Utils.getX(rect) + 10;
|
||||
// }
|
||||
// if (event.getY() > 0 && event.getY() < barHeight && event.getX() > xNum) {
|
||||
// if (setting.contains(event.getPoint()) || cancel.contains(event.getPoint())) {
|
||||
// setCursor(new Cursor(Cursor.HAND_CURSOR));
|
||||
// } else {
|
||||
// setCursor(new Cursor(Cursor.N_RESIZE_CURSOR));
|
||||
// }
|
||||
// } else {
|
||||
// setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -207,9 +161,6 @@ public class DistributedDataPane extends JBPanel {
|
||||
|
||||
@Override
|
||||
public void mousePressed(MouseEvent event) {
|
||||
// srcBounds = DistributedDataPane.this.getBounds()
|
||||
// startPoint = SwingUtilities
|
||||
// .convertPoint(MyTabPanel.this, event.getPoint(), MyTabPanel.this.getRootPane().getLayeredPane())
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -395,7 +395,6 @@ public class DistributedTimeShaft extends JBPanel implements KeyListener, MouseL
|
||||
g2.fillRect(0, 0, getWidth(), getHeight());
|
||||
g2.setComposite(alpha100);
|
||||
g2.setColor(JBColor.foreground());
|
||||
// g2.drawString("CPU Usage", 3, 13);
|
||||
g2.setComposite(alpha100);
|
||||
if (startX == 0 && endX == 0) {
|
||||
startX = 0;
|
||||
|
@ -73,12 +73,6 @@ class AppTracePanelTest {
|
||||
delay(10000);
|
||||
mouseClick(317, 373);
|
||||
select(494, 367, 584, 467);
|
||||
// select(419, 369, 500, 469);
|
||||
// mouseClick(1290, 96);
|
||||
// mouseClick(315, 535);
|
||||
// mouseClick(1290, 96);
|
||||
// mouseClick(52, 437);
|
||||
// mouseClick(1386, 97);
|
||||
delay();
|
||||
}
|
||||
|
||||
@ -122,4 +116,4 @@ class AppTracePanelTest {
|
||||
robot.delay(1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -68,7 +68,6 @@ class DistributedDataStatisticsPaneTest {
|
||||
frame = new FrameFixture(jFrame);
|
||||
frame.show(new Dimension(1024, 600));
|
||||
frame.moveTo(new Point(0, 0));
|
||||
// inspect();
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
@ -100,7 +99,6 @@ class DistributedDataStatisticsPaneTest {
|
||||
mouseClick(312, 64);
|
||||
mouseClick(290, 158);
|
||||
mouseClick(390, 68);
|
||||
// inspect();
|
||||
delay();
|
||||
}
|
||||
|
||||
@ -140,4 +138,4 @@ class DistributedDataStatisticsPaneTest {
|
||||
robot.delay(1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -80,7 +80,6 @@ class DistributedPanelTest {
|
||||
.setOffsetB(186590530788000L)
|
||||
.build());
|
||||
panel.updateUI();
|
||||
// inspect();
|
||||
delay(10000);
|
||||
select(280, 90, 285, 90); // 测试选择时间区间
|
||||
keyClick(KeyEvent.VK_W); // 测试 wsad 缩放
|
||||
@ -88,10 +87,6 @@ class DistributedPanelTest {
|
||||
keyClick(KeyEvent.VK_A);
|
||||
keyClick(KeyEvent.VK_D);
|
||||
mouseClick(23, 234); // 展开thread
|
||||
// mouseClick(43, 234);//选中thread
|
||||
// select(300, 234,400, 236);//选中thread范围
|
||||
// mouseClick(300, 234);//取消选中thread
|
||||
// mouseClick(430, 234);//点击func
|
||||
delay();
|
||||
}
|
||||
|
||||
@ -135,4 +130,4 @@ class DistributedPanelTest {
|
||||
robot.delay(1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -630,7 +630,6 @@ class AnalystPanelTest {
|
||||
AnalystPanel analystPanel = new AnalystPanel();
|
||||
JFrame jbPanel = new JFrame();
|
||||
jbPanel.add(analystPanel);
|
||||
// AnalystPanel.layeredPane = jbPanel.getLayeredPane();
|
||||
FlagBean flagBean = new FlagBean();
|
||||
flagBean.setColor(Color.BLACK);
|
||||
flagBean.setTime(1L);
|
||||
@ -643,7 +642,6 @@ class AnalystPanelTest {
|
||||
AnalystPanel analystPanel = new AnalystPanel();
|
||||
JFrame jbPanel = new JFrame();
|
||||
jbPanel.add(analystPanel);
|
||||
// AnalystPanel.layeredPane = jbPanel.getLayeredPane();
|
||||
FlagBean flagBean = new FlagBean();
|
||||
flagBean.setColor(Color.BLACK);
|
||||
flagBean.setTime(0L);
|
||||
@ -668,7 +666,6 @@ class AnalystPanelTest {
|
||||
AnalystPanel analystPanel = new AnalystPanel();
|
||||
JFrame jbPanel = new JFrame();
|
||||
jbPanel.add(analystPanel);
|
||||
// AnalystPanel.layeredPane = jbPanel.getLayeredPane();
|
||||
FlagBean flagBean = new FlagBean();
|
||||
flagBean.setColor(Color.BLACK);
|
||||
flagBean.setTime(-1000L);
|
||||
@ -681,11 +678,10 @@ class AnalystPanelTest {
|
||||
AnalystPanel analystPanel = new AnalystPanel();
|
||||
JFrame jbPanel = new JFrame();
|
||||
jbPanel.add(analystPanel);
|
||||
// AnalystPanel.layeredPane = jbPanel.getLayeredPane();
|
||||
FlagBean flagBean = new FlagBean();
|
||||
flagBean.setColor(Color.BLACK);
|
||||
flagBean.setTime(Long.MAX_VALUE);
|
||||
analystPanel.clickTimeFlag(flagBean);
|
||||
assertNotNull(flagBean);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,57 +0,0 @@
|
||||
// /*
|
||||
// * Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
// * Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// * you may not use this file except in compliance with the License.
|
||||
// * You may obtain a copy of the License at
|
||||
// *
|
||||
// * http://www.apache.org/licenses/LICENSE-2.0
|
||||
// *
|
||||
// * Unless required by applicable law or agreed to in writing, software
|
||||
// * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// * See the License for the specific language governing permissions and
|
||||
// * limitations under the License.
|
||||
// */
|
||||
//
|
||||
// package ohos.devtools.views.trace.component;
|
||||
//
|
||||
// import org.junit.jupiter.api.Test;
|
||||
//
|
||||
// import java.awt.event.MouseEvent;
|
||||
//
|
||||
// /**
|
||||
// * test TabPanel class .
|
||||
// *
|
||||
// * @version 1.0
|
||||
// * @date 2021/4/24 18:03
|
||||
// **/
|
||||
// class TabPanelTest {
|
||||
// /**
|
||||
// * test function the mouseDragged .
|
||||
// */
|
||||
// @Test
|
||||
// void mouseDragged() {
|
||||
// TabPanel tabPanel = new TabPanel();
|
||||
// MouseEvent mouseEvent = new MouseEvent(tabPanel, 1, 1, 1, 1, 1, 1, true, 1);
|
||||
// tabPanel.mouseDragged(mouseEvent);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * test function the mouseMoved .
|
||||
// */
|
||||
// @Test
|
||||
// void mouseMoved() {
|
||||
// TabPanel tabPanel = new TabPanel();
|
||||
// MouseEvent mouseEvent = new MouseEvent(tabPanel, 1, 1, 1, 1, 1, 1, true, 1);
|
||||
// tabPanel.mouseMoved(mouseEvent);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * test function the hideInBottom .
|
||||
// */
|
||||
// @Test
|
||||
// void hideInBottom() {
|
||||
// TabPanel tabPanel = new TabPanel();
|
||||
// tabPanel.hideInBottom();
|
||||
// }
|
||||
// }
|
Loading…
Reference in New Issue
Block a user