use of com.bixly.pastevid.util.view.MouseMoveListener in project screenbird by adamhub.
the class SettingsForm method initSettingsPanel.
/**
* Initializes the settings panel.
*/
private void initSettingsPanel() {
int startX = 30;
int startY = 30;
try {
this.setLocation(startX, startY);
this.dispose();
} catch (Exception e) {
}
jpSettings = new SettingsPanel();
MouseMoveListener mml = new MouseMoveListener(jpSettings);
this.addMouseListener(mml);
this.addMouseMotionListener(mml);
this.setAlwaysOnTop(true);
this.setUndecorated(true);
try {
if (!AWTUtilities.isTranslucencyCapable(this.getGraphicsConfiguration())) {
log("Can not set transparency for settings form");
this.setBackground(new Color(64, 64, 64, 255));
this.jpSettings.setBackground(new Color(64, 64, 64, 255));
this.jpSettings.setOpaque(true);
} else {
log("Transparency is set for settings form");
AWTUtilities.setWindowOpaque(this, false);
}
} catch (Exception ex) {
log(ex);
}
this.add(jpSettings);
// Hack for handling draggable JFrames on Mac OSX
this.getRootPane().putClientProperty("apple.awt.draggableWindowBackground", Boolean.FALSE);
this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
this.setLocation(startX, startY);
this.pack();
this.setVisible(false);
}
use of com.bixly.pastevid.util.view.MouseMoveListener in project screenbird by adamhub.
the class RecorderPanel method addMouseListeners.
/**
* Creates the listeners for mouse clicks and drags.
*/
private void addMouseListeners() {
this.appMouseListener = new MouseMoveListener(this);
this.addMouseListener(this.appMouseListener);
this.addMouseMotionListener(this.appMouseListener);
}
use of com.bixly.pastevid.util.view.MouseMoveListener in project screenbird by adamhub.
the class RecorderPanel method showUploadForm.
/**
* Brings UploadForm to view for finalizing the encoding of video and
* uploading video to the web site.
*/
private void showUploadForm() {
// End video preview, if any
if (this.scrubManager != null) {
this.scrubManager.endPreviewVideo();
}
// Setup slug associated with the video
if ((this.outputMovieSlug != null) && this.outputMovieSlug.length() == 0) {
String reservedSlug = Session.getInstance().user.getSlug();
if (reservedSlug.length() == 0) {
this.outputMovieSlug = FileUtil.toBase36(recorder.getFileMS());
} else {
this.outputMovieSlug = reservedSlug;
}
}
// Hide recorder controls
this.jpRecorderNonRec.setVisible(false);
this.recorderPanelBG1.setVisible(false);
this.jpRecorderRec.setVisible(false);
this.jfSettings.hideSettingsForm();
this.jpUpload.setVisible(false);
// Upload options
this.chkAutoUpload.setOpaque(false);
this.chkPublic.setOpaque(false);
// Show upload form
this.jpUpload.setVisible(true);
// Initially hide upload form components
this.lblUploadMessage.setVisible(false);
this.txtUrl.setVisible(false);
this.jLabel2.setVisible(false);
this.btnCopy.setVisible(false);
// Free up the recorder controls from being attached to the capture box
this.appMouseListener.setLocked(false);
this.appMouseListener.setSnapArea(null);
if (uploadUrlListener == null) {
// Add click listener to video URL label
this.txtUrl.removeMouseListener(uploadUrlListener);
this.uploadUrlListener = new MouseMoveListener(this) {
@Override
public void mouseClicked(MouseEvent e) {
redirectOnUpload = false;
uploadLinkClickAction();
}
};
}
// Updates video data to upload form
this.loadVideoData();
this.changeSize(UPLOAD_SIZE);
this.centerRecorderPanel();
// Hide capture box
if (this.captureBox != null) {
this.captureBox.setCaptureboxVisible(false, true, false);
}
// Remove recorder panel from focus
this.jfRecorderPanel.controlSetAlwaysOnTop(false);
}
Aggregations