本文整理了Java中javax.swing.JEditorPane.getPage()
方法的一些代码示例,展示了JEditorPane.getPage()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JEditorPane.getPage()
方法的具体详情如下:
包路径:javax.swing.JEditorPane
类名称:JEditorPane
方法名:getPage
暂无
代码示例来源:origin: org.bitbucket.goalhub.simpleide/jedit
URL getCurrentPage() {
return viewer.getPage();
} //}}}
代码示例来源:origin: org.bitbucket.goalhub.simpleide/jedit
public void propertyChange(PropertyChangeEvent evt)
{
if("page".equals(evt.getPropertyName()))
{
String titleStr = (String)viewer.getDocument()
.getProperty("title");
if(titleStr == null)
{
titleStr = MiscUtilities.getFileName(
viewer.getPage().toString());
}
title.setText(titleStr);
historyModel.updateTitle(viewer.getPage().toString(),
titleStr);
}
}
} //}}}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
@Override
public void hyperlinkUpdate(HyperlinkEvent event) {
if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
try {
if (event.getURL().toExternalForm().endsWith(".zip")
|| event.getURL().toExternalForm().endsWith(".jar")) {
// don't render archives!
} else {
if (m_browserHistory.size() == 0) {
m_backB.setEnabled(true);
}
m_browserHistory.add(m_infoPane.getPage());
m_infoPane.setPage(event.getURL());
}
} catch (IOException ioe) {
}
}
}
});
代码示例来源:origin: Waikato/weka-trunk
@Override
public void hyperlinkUpdate(HyperlinkEvent event) {
if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
try {
if (event.getURL().toExternalForm().endsWith(".zip")
|| event.getURL().toExternalForm().endsWith(".jar")) {
// don't render archives!
} else {
if (m_browserHistory.size() == 0) {
m_backB.setEnabled(true);
}
m_browserHistory.add(m_infoPane.getPage());
m_infoPane.setPage(event.getURL());
}
} catch (IOException ioe) {
}
}
}
});
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
@Override
public void actionPerformed(ActionEvent e) {
try {
URL back = m_infoPane.getPage();
if (back != null) {
m_browserHistory.add(back);
}
String initialPage = initialPage();
m_infoPane.setContentType("text/html");
m_infoPane.setText(initialPage);
HomePageThread hp = new HomePageThread();
hp.setPriority(Thread.MIN_PRIORITY);
hp.start();
} catch (Exception ex) {
// don't make a fuss
}
}
});
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
URL back = m_infoPane.getPage();
if (m_browserHistory.size() == 0 && back != null) {
m_backB.setEnabled(true);
代码示例来源:origin: javax.help/javahelp
String file = u.getFile();
if (file.endsWith("/") || file.endsWith("\\")) {
u = html.getPage();
debug("current u=" + u);
file = u.getFile();
代码示例来源:origin: UISpec4J/UISpec4J
private void dispatchHyperlinkEvent(String href) {
URL url;
try {
JEditorPane editorPane = (JEditorPane)jTextComponent;
url = new URL(editorPane.getPage(), href);
}
catch (MalformedURLException e) {
url = null;
}
HyperlinkEvent event =
new HyperlinkEvent(jTextComponent,
HyperlinkEvent.EventType.ACTIVATED,
url,
href);
JEditorPane editorPane = (JEditorPane)jTextComponent;
HyperlinkListener[] listeners = editorPane.getHyperlinkListeners();
for (HyperlinkListener listener : listeners) {
listener.hyperlinkUpdate(event);
}
}
代码示例来源:origin: Waikato/weka-trunk
@Override
public void actionPerformed(ActionEvent e) {
try {
URL back = m_infoPane.getPage();
if (back != null) {
m_browserHistory.add(back);
}
String initialPage = initialPage();
m_infoPane.setContentType("text/html");
m_infoPane.setText(initialPage);
HomePageThread hp = new HomePageThread();
hp.setPriority(Thread.MIN_PRIORITY);
hp.start();
} catch (Exception ex) {
// don't make a fuss
}
}
});
代码示例来源:origin: Waikato/weka-trunk
URL back = m_infoPane.getPage();
if (m_browserHistory.size() == 0 && back != null) {
m_backB.setEnabled(true);
代码示例来源:origin: zitmen/thunderstorm
/**
* shows the url in the static window, sizes and positions the window
* accordingly
*/
private void showInTextWindow() throws IOException {
window.setVisible(false);
// same height as parent window of the button, positioned next to it on left or right side
Window ancestor = SwingUtilities.getWindowAncestor(this);
window.setPreferredSize(new Dimension(WINDOW_WIDTH, Math.max(ancestor.getHeight(), WINDOW_HEIGHT)));
int screenEnd = ancestor.getGraphicsConfiguration().getBounds().width + ancestor.getGraphicsConfiguration().getBounds().x;
Point ancestorLocation = ancestor.getLocationOnScreen();
if(ancestorLocation.x + ancestor.getWidth() + window.getPreferredSize().width < screenEnd) {
window.setLocation(ancestorLocation.x + ancestor.getWidth(), ancestorLocation.y);
} else {
window.setLocation(ancestorLocation.x - window.getPreferredSize().width, ancestorLocation.y);
}
//set page shown in browser
if(url != null && !url.equals(htmlBrowser.getPage())) {
try {
htmlBrowser.setPage(url);
} catch(Exception e) {
htmlBrowser.setText("Could not load help file");
}
}
window.pack();
window.setVisible(true);
}
代码示例来源:origin: org.bitbucket.goalhub.simpleide/jedit
if(!_url.equals(viewer.getPage()))
historyModel.setCurrentScrollPosition(viewer.getPage(),getCurrentScrollPosition());
viewer.setPage(_url);
if (0 != scrollPosition)
代码示例来源:origin: javax.help/javahelp
html.setText("");
}else if (changeName.equals("reload")) {
URL url = html.getPage();
if (url != null) {
try {
代码示例来源:origin: stackoverflow.com
URL currentUrl = displayEditorPane.getPage();
int pageIndex = pageList.indexOf(currentUrl.toString());
try {
URL currentUrl = displayEditorPane.getPage();
int pageIndex = pageList.indexOf(currentUrl.toString());
try {
URL currentUrl = displayEditorPane.getPage();
URL newUrl = displayEditorPane.getPage();
forwardButton.setEnabled(false);
} else {
URL currentUrl = displayEditorPane.getPage();
int pageIndex = pageList.indexOf(currentUrl.toString());
backButton.setEnabled(pageIndex > 0);
内容来源于网络,如有侵权,请联系作者删除!