本文整理汇总了Java中java.beans.PropertyVetoException.printStackTrace方法的典型用法代码示例。如果您正苦于以下问题:Java PropertyVetoException.printStackTrace方法的具体用法?Java PropertyVetoException.printStackTrace怎么用?Java PropertyVetoException.printStackTrace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.beans.PropertyVetoException
的用法示例。
在下文中一共展示了PropertyVetoException.printStackTrace方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: registerAtDesktopAndSetVisible
import java.beans.PropertyVetoException; //导入方法依赖的package包/类
/**
* Register at the graph desktop and set this extended JInternalFrame visible.
* @see JDesktopPane
* @param jDesktopLayer the layer in which the JInternaFrame has to be added (e.g. JDesktopPane.PALETTE_LAYER)
*/
protected void registerAtDesktopAndSetVisible(Object jDesktopLayer) {
// --- Does the dialog for that component already exists? ---------
JInternalFrame compProps = this.graphDesktop.getEditor(this.getTitle());
if (compProps!=null) {
try {
// --- Make visible, if invisible ---------
if (compProps.isVisible()==false) compProps.setVisible(true);
// --- Move to front ----------------------
compProps.moveToFront();
// --- Set selected -----------------------
compProps.setSelected(true);
} catch (PropertyVetoException pve) {
pve.printStackTrace();
}
} else {
this.graphDesktop.add(this, jDesktopLayer);
this.graphDesktop.registerEditor(this, this.isRemindAsLastOpenedEditor());
this.setVisible(true);
}
}
示例2: defualtDataSource
import java.beans.PropertyVetoException; //导入方法依赖的package包/类
@Bean
public DataSource defualtDataSource() {
ComboPooledDataSource defualtDatasource = new ComboPooledDataSource();
try {
defualtDatasource.setJdbcUrl(environment.getProperty("db.url"));
defualtDatasource.setUser(environment.getProperty("db.user"));
defualtDatasource.setPassword(environment.getProperty("db.pass"));
defualtDatasource.setDriverClass(environment.getProperty("db.driver"));
defualtDatasource.setInitialPoolSize(Integer.valueOf("1"));
defualtDatasource.setMaxPoolSize(Integer.parseInt("5"));
defualtDatasource.setMinPoolSize(Integer.parseInt("5"));
defualtDatasource.setMaxConnectionAge(Integer.parseInt("100"));
} catch (PropertyVetoException e) {
e.printStackTrace();
}
return defualtDatasource;
}
示例3: MyFileSystem
import java.beans.PropertyVetoException; //导入方法依赖的package包/类
public MyFileSystem (FileSystem[] fileSystems) {
super (fileSystems);
try {
setSystemName ("TestFS");
} catch (PropertyVetoException ex) {
ex.printStackTrace();
}
}
示例4: proccessDataSource
import java.beans.PropertyVetoException; //导入方法依赖的package包/类
private PooledDataSource proccessDataSource(String tenantIdentifier) {
ComboPooledDataSource comboPooledDataSource = new ComboPooledDataSource("key-2");
try {
comboPooledDataSource.setJdbcUrl("jdbc:mysql://localhost:3306/boot-mysql-2");
comboPooledDataSource.setDriverClass("com.mysql.jdbc.Driver");
comboPooledDataSource.setUser("root");
comboPooledDataSource.setPassword("");
} catch (PropertyVetoException e) {
e.printStackTrace();
}
return comboPooledDataSource;
}
开发者ID:mojtaba-sharif,项目名称:repository-multi-tenancy,代码行数:13,代码来源:BaseMultiTenantConnectionProviderImp.java
示例5: MyFileSystem
import java.beans.PropertyVetoException; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
public MyFileSystem (FileSystem[] fileSystems) {
super (fileSystems);
try {
setSystemName ("TestFS");
} catch (PropertyVetoException ex) {
ex.printStackTrace();
}
}
示例6: MemoryFileSystem
import java.beans.PropertyVetoException; //导入方法依赖的package包/类
/** Creates new MemoryFS */
public MemoryFileSystem() {
attr = this;
list = this;
change = this;
info = this;
try {
_setSystemName("MemoryFileSystem" + String.valueOf(id));
} catch (PropertyVetoException ex) {
ex.printStackTrace();
}
}
示例7: createFileSystem
import java.beans.PropertyVetoException; //导入方法依赖的package包/类
/**
*
* @param testName name of test
* @return array of FileSystems that should be tested in test named: "testName" */
protected FileSystem[] createFileSystem (String testName, String[] resources) throws IOException {
FileSystem lfs = TestUtilHid.createLocalFileSystem("mfs2"+testName, new String[] {});
FileSystem xfs = TestUtilHid.createXMLFileSystem(testName, resources);
FileSystem mfs = new MultiFileSystem(lfs, xfs);
try {
mfs.setSystemName("mfs2test");
} catch (PropertyVetoException e) {
e.printStackTrace(); //To change body of catch statement use Options | File Templates.
}
return new FileSystem[] {mfs,lfs,xfs};
}
示例8: createFileSystem
import java.beans.PropertyVetoException; //导入方法依赖的package包/类
/**
*
* @param testName name of test
* @return array of FileSystems that should be tested in test named: "testName" */
protected FileSystem[] createFileSystem (String testName, String[] resources) throws IOException {
FileSystem lfs = TestUtilHid.createLocalFileSystem("mfs1"+testName, resources);
FileSystem xfs = TestUtilHid.createXMLFileSystem(testName, new String[] {});
FileSystem mfs = new MultiFileSystem(lfs, xfs);
try {
mfs.setSystemName("mfs1test");
} catch (PropertyVetoException e) {
e.printStackTrace(); //To change body of catch statement use Options | File Templates.
}
return new FileSystem[] {mfs,lfs,xfs};
}
示例9: createFileSystem
import java.beans.PropertyVetoException; //导入方法依赖的package包/类
/**
*
* @param testName name of test
* @return array of FileSystems that should be tested in test named: "testName" */
protected FileSystem[] createFileSystem (String testName, String[] resources) throws IOException {
FileSystem lfs = TestUtilHid.createLocalFileSystem("mfs3"+testName, resources);
FileSystem xfs = TestUtilHid.createXMLFileSystem(testName, resources);
FileSystem mfs = new MultiFileSystem(lfs, xfs);
try {
mfs.setSystemName("mfs3test");
} catch (PropertyVetoException e) {
e.printStackTrace(); //To change body of catch statement use Options | File Templates.
}
return new FileSystem[] {mfs,lfs,xfs};
}
示例10: MyFileSystem
import java.beans.PropertyVetoException; //导入方法依赖的package包/类
public MyFileSystem(FileSystem[] fileSystems) {
super(fileSystems);
try {
setSystemName("TestFS");
} catch (PropertyVetoException ex) {
ex.printStackTrace();
}
}
示例11: closeAllBasicGraphGuiProperties
import java.beans.PropertyVetoException; //导入方法依赖的package包/类
/**
* Will close all open property windows for GraphNodes and NetworkCoponents.
*/
public void closeAllBasicGraphGuiProperties() {
Vector<String> internalFramesTitles = new Vector<String>(this.getHashMapEditorFrames().keySet());
for (String internalFrameTitles : internalFramesTitles) {
JInternalFrame internalFrame = this.getHashMapEditorFrames().get(internalFrameTitles);
if (internalFrame instanceof BasicGraphGuiProperties) {
try {
internalFrame.setClosed(true);
} catch (PropertyVetoException pve) {
pve.printStackTrace();
}
}
}
}
示例12: getBasicGraphGuiJDesktopPane
import java.beans.PropertyVetoException; //导入方法依赖的package包/类
/**
* Returns the BasicGraphGuiJDesktopPane
* @return the BasicGraphGuiJDesktopPane
*/
public BasicGraphGuiJDesktopPane getBasicGraphGuiJDesktopPane() {
if (basicGraphGuiJDesktopPane==null) {
basicGraphGuiJDesktopPane = new BasicGraphGuiJDesktopPane((GraphEnvironmentController) this.environmentController);
basicGraphGuiJDesktopPane.add(this.getBasicGraphGuiRootJSplitPane(), JLayeredPane.DEFAULT_LAYER);
try {
this.getBasicGraphGuiRootJSplitPane().setMaximum(true);
} catch (PropertyVetoException pvex) {
pvex.printStackTrace();
}
}
return basicGraphGuiJDesktopPane;
}
示例13: proccessDataSource
import java.beans.PropertyVetoException; //导入方法依赖的package包/类
private PooledDataSource proccessDataSource(String tenantIdentifier) {
System.out.println("connection is null, start process " + tenantIdentifier);
DataSourceWrapper sourceWrapper = DataSourceRegistery.getInstance().get(tenantIdentifier);
if (sourceWrapper == null) {
System.out.println("datasource is null for tenantid in map " + tenantIdentifier);
sourceWrapper = restTemplate.getForObject("http://localhost:8888/database-management/tenant/{tenantId}", DataSourceWrapper.class, tenantIdentifier);
System.out.println("get datasurce in database management " + tenantIdentifier);
sourceWrapper.setTenantId(tenantIdentifier);
DataSourceRegistery.getInstance().put(sourceWrapper.getTenantId(), sourceWrapper);
System.out.println("put datasource in map " + tenantIdentifier);
}
System.out.println("create connection for tenantId " + tenantIdentifier);
ComboPooledDataSource comboPooledDataSource = new ComboPooledDataSource(sourceWrapper.getTenantId());
comboPooledDataSource.setJdbcUrl(sourceWrapper.getUrl());
comboPooledDataSource.setUser(sourceWrapper.getUsername());
comboPooledDataSource.setPassword(sourceWrapper.getPassword());
comboPooledDataSource.setInitialPoolSize(sourceWrapper.getInitialPoolSize());
comboPooledDataSource.setMinPoolSize(sourceWrapper.getMinPoolSize());
comboPooledDataSource.setMaxPoolSize(sourceWrapper.getMaxPoolSize());
comboPooledDataSource.setMaxConnectionAge(sourceWrapper.getPoolMaxConnectionAge());
try {
comboPooledDataSource.setDriverClass(sourceWrapper.getDriver());
} catch (PropertyVetoException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println("finish process for tenantId " + tenantIdentifier);
return comboPooledDataSource;
}
示例14: setIcon
import java.beans.PropertyVetoException; //导入方法依赖的package包/类
private void setIcon(boolean b) {
try {
jif.setIcon(b);
} catch (PropertyVetoException e) {
e.printStackTrace();
}
}
示例15: init
import java.beans.PropertyVetoException; //导入方法依赖的package包/类
private static void init()
{
String[] instructions =
{
"This is an AUTOMATIC test, simply wait until it is done.",
"The result (passed or failed) will be shown in the",
"message window below."
};
Sysout.createDialog( );
Sysout.printInstructions( instructions );
// Create a frame with two non-opaque JInternalFrame's containing
// heavyweight buttons.
JFrame jframe = new JFrame("mixing test");
JDesktopPane desktop = new JDesktopPane();
jframe.setContentPane(desktop);
JInternalFrame iframe1 = new JInternalFrame("iframe 1");
iframe1.setIconifiable(true);
iframe1.add(new MyButton());
iframe1.setBounds(10, 10, 100, 100);
iframe1.setOpaque(false);
iframe1.setVisible(true);
desktop.add(iframe1);
JInternalFrame iframe2 = new JInternalFrame("iframe 2");
iframe2.setIconifiable(true);
iframe2.add(new MyButton());
iframe2.setBounds(50, 50, 100, 100);
iframe2.setOpaque(false);
iframe2.setVisible(true);
desktop.add(iframe2);
jframe.setSize(300, 300);
jframe.setVisible(true);
Robot robot = Util.createRobot();
robot.setAutoDelay(20);
Util.waitForIdle(robot);
// Try selecting the bottommost frame
try {
iframe2.setSelected(true);
} catch (PropertyVetoException ex) {
ex.printStackTrace();
}
// Click the title bar of the internal frame
Point lLoc = iframe2.getLocationOnScreen();
System.err.println("lLoc: " + lLoc);
robot.mouseMove(lLoc.x + 10, lLoc.y + 10);
Util.waitForIdle(robot);
robot.mousePress(InputEvent.BUTTON1_MASK);
robot.mouseRelease(InputEvent.BUTTON1_MASK);
Util.waitForIdle(robot);
if (failed) {
fail("The JInternalFrame is considered non-opaque.");
} else {
pass();
}
}