use of javax.swing.RootPaneContainer in project pcgen by PCGen.
the class CursorControlUtilities method stopWaitCursor.
public static void stopWaitCursor(JComponent component) {
RootPaneContainer root = ((RootPaneContainer) component.getTopLevelAncestor());
root.getGlassPane().setCursor(DEFAULT_CURSOR);
root.getGlassPane().removeMouseListener(CLICK_CONSUMER);
root.getGlassPane().setVisible(false);
root.getRootPane().validate();
}
use of javax.swing.RootPaneContainer in project JWildfire by thargor6.
the class EnvelopeController method clearCrosshairCursor.
private void clearCrosshairCursor() {
RootPaneContainer root = (RootPaneContainer) envelopePanel.getTopLevelAncestor();
root.getGlassPane().setCursor(DEFAULT_CURSOR);
root.getGlassPane().setVisible(false);
}
use of javax.swing.RootPaneContainer in project freeplane by freeplane.
the class NoteDialogStarter method editNoteInDialog.
void editNoteInDialog(final NodeModel nodeModel) {
final Controller controller = Controller.getCurrentController();
stopEditing();
Controller.getCurrentModeController().setBlocked(true);
String text = NoteModel.getNoteText(nodeModel);
if (text == null) {
text = "";
}
final EditNodeBase.IEditControl editControl = new EditNodeBase.IEditControl() {
public void cancel() {
Controller.getCurrentModeController().setBlocked(false);
mCurrentEditDialog = null;
}
public void ok(final String newText) {
setHtmlText(nodeModel, newText);
cancel();
}
public void split(final String newText, final int position) {
}
public boolean canSplit() {
return false;
}
public EditedComponent getEditType() {
return EditedComponent.NOTE;
}
};
final IEditBaseCreator textFieldCreator = (IEditBaseCreator) Controller.getCurrentController().getMapViewManager();
mCurrentEditDialog = textFieldCreator.createEditor(nodeModel, editControl, text, true);
final RootPaneContainer frame = (RootPaneContainer) SwingUtilities.getWindowAncestor(controller.getMapViewManager().getMapViewComponent());
mCurrentEditDialog.show(frame);
}
use of javax.swing.RootPaneContainer in project freeplane by freeplane.
the class MTextController method editDetails.
public void editDetails(final NodeModel nodeModel, InputEvent e, final boolean editLong) {
final Controller controller = Controller.getCurrentController();
stopEditing();
Controller.getCurrentModeController().setBlocked(true);
String text = DetailTextModel.getDetailTextText(nodeModel);
final boolean isNewNode = text == null;
if (isNewNode) {
final MTextController textController = MTextController.getController();
textController.setDetails(nodeModel, "<html>");
text = "";
}
final EditNodeBase.IEditControl editControl = new EditNodeBase.IEditControl() {
@Override
public void cancel() {
if (isNewNode) {
final String detailText = DetailTextModel.getDetailTextText(nodeModel);
final MModeController modeController = (MModeController) Controller.getCurrentModeController();
if (detailText != null)
modeController.undo();
modeController.resetRedo();
}
stop();
}
@Override
public void ok(final String newText) {
if (HtmlUtils.isEmpty(newText))
if (isNewNode) {
final MModeController modeController = (MModeController) Controller.getCurrentModeController();
modeController.undo();
modeController.resetRedo();
} else {
keepNodePosition();
setDetailsHtmlText(nodeModel, null);
}
else {
keepNodePosition();
setDetailsHtmlText(nodeModel, newText);
}
stop();
}
private void keepNodePosition() {
Controller.getCurrentController().getSelection().keepNodePosition(nodeModel, 0, 0);
}
@Override
public void split(final String newText, final int position) {
}
private void stop() {
Controller.getCurrentModeController().setBlocked(false);
mCurrentEditor = null;
}
@Override
public boolean canSplit() {
return false;
}
@Override
public EditedComponent getEditType() {
return EditedComponent.DETAIL;
}
};
mCurrentEditor = createEditor(nodeModel, editControl, text, false, editLong, true);
final RootPaneContainer frame = (RootPaneContainer) SwingUtilities.getWindowAncestor(controller.getMapViewManager().getMapViewComponent());
mCurrentEditor.show(frame);
}
use of javax.swing.RootPaneContainer in project freeplane by freeplane.
the class FilterConditionEditor method setSearchingDefaultCursor.
public void setSearchingDefaultCursor() {
RootPaneContainer root = (RootPaneContainer) getTopLevelAncestor();
root.getGlassPane().setCursor(Cursor.getDefaultCursor());
root.getGlassPane().setVisible(false);
}
Aggregations